What is java serialization and how to implement java serialization ?, Java serialization implementation
Serialization is a mechanism for processing object streams. Object streams are called object streams that stream object content. Yes
You can perform read and write operations on Streaming objects, or transfer streaming objects between networks. Serialization is to solve
Problems caused by read/write operations on Object streams.
Serialization implementation: implement the Serializable interface for the class to be serialized. This interface does not need to be implemented.
Method, implementsSerializable only to mark that the object can be serialized, and then use an output stream (such:
FileOutputStream) to construct an ObjectOutputStream (Object stream) object.
The writeObject (Objectobj) method of the ObjectOutputStream object can write the object whose parameter is obj (that is
Save the status), use the input stream to restore