*
The moose likes Beginning Java and the fly likes can we override writeobject method to acheive serializable concept? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Java » Beginning Java
Bookmark "can we override writeobject method to acheive serializable concept?" Watch "can we override writeobject method to acheive serializable concept?" New topic
Author

can we override writeobject method to acheive serializable concept?

arulraj michaelraj
Greenhorn

Joined: Mar 07, 2007
Posts: 14
Hi,


I know serialization concept. Generally if you want to make a class as serializable,you can implement serializable interface..

once we implement it, jvm take care of the object to be serialied by using writeObject and readobject method().
But my doubt is that can we override these methods directly in our own class,so that we can achieve that serialiable concept?
Peter Chase
Ranch Hand

Joined: Oct 30, 2001
Posts: 1970
Read the documentation.

It is possible to override the default serialisation behaviour. How that is done is slightly arcane, but well-documented.


Betty Rubble? Well, I would go with Betty... but I'd be thinking of Wilma.
 
GeeCON Prague 2014
 
subject: can we override writeobject method to acheive serializable concept?