Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Externalizable interface  RSS feed

 
RAMA KRISHNA AALLA
Greenhorn
Posts: 29
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
what is the use of Externalizable interface?

thanks in advace,
RK CHOWDARY
 
Ernest Friedman-Hill
author and iconoclast
Sheriff
Posts: 24215
37
Chrome Eclipse IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
wise owen
Ranch Hand
Posts: 2023
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!