What is java serialization and how to implement java serialization ?, Java serialization implementation

Source: Internet
Author: User

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.