This week's book giveaway is in the Agile and Other Processes forum.
We're giving away four copies of The Little Book of Impediments (e-book only) and have Tom Perry on-line!
See this thread for details.
Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Serializable interface

 
parra matta
Ranch Hand
Posts: 40
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

In the API spec for Serializable, it says:

Classes that require special handling during the serialization and deserialization process must implement special methods with these exact signatures:


private void writeObject(java.io.ObjectOutputStream out)
throws IOException
private void readObject(java.io.ObjectInputStream in)
throws IOException, ClassNotFoundException;

May I ask where these two methods are defined?

Thanks.
 
Purushoth Thambu
Ranch Hand
Posts: 425
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
These methods are not defined in any interface. It's just about how to use take control of serialization of your objects. Default serialization will be used when these methods are not implemented.
 
parra matta
Ranch Hand
Posts: 40
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks. That's clear
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic