my dog learned polymorphism*
The moose likes Java in General and the fly likes Using Externalization? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Java in General
Bookmark "Using Externalization?" Watch "Using Externalization?" New topic
Author

Using Externalization?

Anil Vupputuri
Ranch Hand

Joined: Oct 31, 2000
Posts: 527
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


SCJP 1.5, SCEA, ICED (287,484,486)
Ajith Kallambella
Sheriff

Joined: Mar 17, 2000
Posts: 5782
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


Open Group Certified Distinguished IT Architect. Open Group Certified Master IT Architect. Sun Certified Architect (SCEA).
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Using Externalization?