Serialization is the process of converting a set of object instance that contain refenece to each other into a linear stream of bytes which can be sent through a soket store in a file or simply manipulated as a stream of data
Object Serialization in Java is a process used to convert Object into a binary format which can be persisted into disk or sent over network to any other running Java virtual machine. Java provides Serialization API for serializing and deserializing object which includes java.io.Serializable, java.io.Externalizable, ObjectInputStream and ObjectOutputStream etc.
Serializable is a marker interfaces that tells the JVM is can write out the state of the object to some stream (basically read all the members, and write out their state to a stream, or to disk or something). The default mechanism is a binary format. You can also use it to clone things, or keep state between invocations, send objects across the network etc
No comments:
Post a Comment