Monday, 25 April 2016

What is the purpose of Externalizable interface ?


The Externizable interface extends Serializable interface.

When you use Serializable interface, your class is serialized automatically by default.
But you can override writeObject() and readObject() two methods to control more complex object serialization process.

When you use Externalizable interface, you have a complete control over your class's serialization process.

The two methods to be implemented are :
  • void readExternal(ObjectInput)
  • void writeExternal(ObjectOutput)

No comments:

Post a Comment

Note: only a member of this blog may post a comment.