Site hosted by Angelfire.com: Build your free website today!
 

Object Serialization

Object serialization provides a program the ability to read or write a whole object to and from a raw byte stream. It allows Java objects and primitives to be encoded into a byte stream suitable for streaming to some type of network or to a file-system, or more generally, to a transmission medium or storage facility.

To persist an object in Java, we must have a persistent object. An object is marked serializable by implementing the java.io.Serializable interface, which signifies to the underlying API that the object can be flattened into bytes and subsequently inflated in the future.

Serializable is only a marker interface -- it simply allows the serialization mechanism to verify that the class is able to be persisted.