How does serialization work.......!!
As Serializable interface is an MARKER interface and does not have any methods or field. Then how does a class implementing Serializable interface is automatically serialized(or the object is converted into bytestream).
Is it that, JVM does know what to do with a serialized object.
If this is the case, can I have a MARKER interface of my own, for a particular functionality.
with regards,
SHIRISH
# 2
> As Serializable interface is an MARKER interface and
> does not have any methods or field. Then how does a
> class implementing Serializable interface is
> automatically serialized(or the object is converted
> into bytestream).
They are not serialized automatically. There are methods available for that - ObjectInputStream.readObject() and ObjectOutputStream.writeObject().
# 3
marker interface definition
http://en.wikipedia.org/wiki/Marker_interface_pattern
interesting blog about why annotations are better suited
http://www.artima.com/weblogs/viewpost.jsp?thread=98061