There are two methods readExternal() and writeExternal() in Externalizable interface those can be used in the serialization process.
Externalizable interface extends Serializable interface.
Need of Externalizable
- If you are not happy with the way java writes/reads objects from stream.
- Special handling for supertypes on object construction during serialization.
Example of Externalizable