What things are required for a class that implements Externalizable?

Tim Rohaly

A class that implements Externalizable must also:

  • Have a public, no-argument constructor.
  • Provide a writeExternal(ObjectOutput) method to save the state of the object, including the state of any superclass, to the ObjectOutput stream.
  • Provide a readExternal(ObjectInput) method to restore the state of the object, including the state of any superclass, from the ObjectInput stream.
0 Comments  (click to add your comment)
Comment and Contribute

 

 

 

 

 


(Maximum characters: 1200). You have 1200 characters left.

 

 

About | Sitemap | Contact