Friday, January 29, 2016

Java Serialization

Java Serialization


What is Java Serialization?
Java serialization is used to write an object into a stream, that can be transported through a network and that object can be rebuilt again. Java serialization API is used for this purpose.
When you want to serialize an object, that respective class should implement the marker interface serializable. It just informs the compiler that this java class can be serialized. You can tag properties that should not be serialized as transient. You open a stream and write the object into it. Java API takes care of the serialization protocol and persists the java object in a file in conformance with the protocol. De-serialization is the process of getting the object back from the file to its original form.

No comments:

Post a Comment