File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Beginning Java and the fly likes Externalizable interface Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Externalizable interface" Watch "Externalizable interface" New topic
Author

Externalizable interface

RAMA KRISHNA AALLA
Greenhorn

Joined: Aug 10, 2005
Posts: 29
what is the use of Externalizable interface?

thanks in advace,
RK CHOWDARY
Ernest Friedman-Hill
author and iconoclast
Marshal

Joined: Jul 08, 2003
Posts: 24187
    
  34

Do you understand what Serializable is for? Externalizable is similar, but it gives you complete control over the format of the serialized data for a class -- i.e., you have to save all the data yourself.


[Jess in Action][AskingGoodQuestions]
wise owen
Ranch Hand

Joined: Feb 02, 2006
Posts: 2023
Externalizable is an interface which contains two methods readExternal and writeExternal. These methods give you a control over the serialization mechanism. Thus if your class implements this interface, you can customize the serialization process by implementing these methods.
You can find a sample in here.
 
 
subject: Externalizable interface