SCJP Certification

Sun Certified Java Programmer Certification exam essentials

October 21st, 2009

What is the Externalizable interface?

Java Facts, by Daisy Williams.

The Externalizable interface is used to provide a complete control over the serialization and deserialization processes.This interface has the following two methods:

  • public void writeExternal(ObjectOutput objout): This method is used to save the contents of an object by calling the methods of the DataOutput interface for its primitive values or calling the writeObject method of ObjectOutput for objects, strings, arrays, etc.
  • public void readExternal(ObjectInput objin): This method is used to restore the contents of an object that was saved using the writeExternal() method. It calls the methods of the DataInput interface for primitive types and the readObject() method for objects, strings, arrays, etc.
Share

Back Top

Responses to “What is the Externalizable interface?”

Comments (0) Trackbacks (0) Leave a comment Trackback url
  1. No comments yet.
  1. No trackbacks yet.

Leave a Reply

Your email address will not be published. Required fields are marked *

*