File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Java in General and the fly likes Serializable interface Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "Serializable interface" Watch "Serializable interface" New topic
Author

Serializable interface

Vallabhaneni Suresh Kumar
Ranch Hand

Joined: Mar 01, 2004
Posts: 68
The objects can be serialized if we extends Serializable interface. Then what are the purpose of writeObect() and readObject() methods? If we want to handle the serialization ourselves, we need to implement these methods or what?

Thank you
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 39547
    
  27
Basically, yes. But if you want to handle serialization yourself, you should implement Externalizable instead of Serializable (and use readExternal/writeExternal, not readObject/writeObject).


Ping & DNS - updated with new look and Ping home screen widget
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Serializable interface
 
Similar Threads
doubt in serializatiion
A doubt about Serializable
serializable interface
Is an empty interface (without any methods) is marker?
Serializable Method contains Any method