File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
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

Win a copy of REST with Spring (video course) this week in the Spring forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Externalizable interface" Watch "Externalizable interface" New topic

Externalizable interface


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

thanks in advace,
Ernest Friedman-Hill
author and iconoclast

Joined: Jul 08, 2003
Posts: 24195

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.
I agree. Here's the link:
subject: Externalizable interface
It's not a secret anymore!