• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Using Externalization?

 
Ranch Hand
Posts: 527
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
What is the diff b/w Serialization and Externalization,At what occasion Externalization can be useful.As in Serialization ,Serialized object can be deserialized and does the same thing applies to Externalization ???
-Anil
 
Sheriff
Posts: 5782
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Externalization takes serialization one step further. <code>Externalizable</code> is an interface that extends <code>Serializable</code>. Classes can implement <code>Externalizable</code> interface and gain the fine-grain control over the way the object gets serialized by overriding <code>readExternal(ObjectInput in)</code> and <code>writeExternal( OjbectOutput out )</code> methods.
During serialization, if the class implements <code>Externalizable</code>, then the overridden methods are called. On the otherhand, if the class implements only <code>Serializable</code>, you'll get the plain vanilla object serialization.

Ajith
 
reply
    Bookmark Topic Watch Topic
  • New Topic