serializable and Externalizable
1 posts in topic
Flat View  Flat View

Posted By:   sandy_codes
Posted On:   Friday, September 3, 2004 12:35 AM

i started developing application using java but i am confused about serialization and Externalization. can you please tell me the basic difference between the two.

Also i want to know that when we should use serializable and Externalizable

Re: serializable and Externalizable

Posted By:   Pavan_Gattu  
Posted On:   Friday, September 3, 2004 01:52 AM

Basically SERIALIZABLE uses default implementation for reading and writing the object you want to persist. You just have to implement SERIALIZABLE interface for your class and rest will be taken care.

For EXTERNALIZABLE you will have to implement the readExternal() and writeExternal() methods. As in you can specify your own way of storing the information and retrieving the information of the object.

Unless you have very specific requirements one wouldn't use EXTERNALIZABLE. SERIALIZABLE is the most common form of using. All you would specify is to implement the SERIALIZABLE interface in the class declaration and nothing
About | Sitemap | Contact