File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
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

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 ???

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

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.


Open Group Certified Distinguished IT Architect. Open Group Certified Master IT Architect. Sun Certified Architect (SCEA).
I agree. Here's the link:
subject: Using Externalization?
It's not a secret anymore!