Wednesday 24 September 2014

Serialization Vs Externalization

  1. Serialization is the process of converting object state into sequence of bytes so that it can be persisted in memory, we can transfer this persisted state of object across network. In case of serialization, the serialization of the object is taken care automatically. Where as in externalization, it is the developer responsibility to what to serialize and what not to serialize.
  2. Object Serialization uses the Serializable and Externalizable interfaces.Where as Externalizable interface extends Serializable.
  1. In case of Serialization, it takes care of serializing all the super classes of this class automatically. Where as in Externalization, it is yours responsibility to serialize super class data.
  2. Serializable interface is a marker interface, where as Externalizable interface is not. It provides two methods, writeExternal and readExternal.
Prevoius                                                 Next                                                 Home

No comments:

Post a Comment