What is Java serialization, and how do I implement Java serialization? __java

Source: Internet
Author: User
Tags serialization

Serialization is the process of converting an object's state to a format that can be persisted or transmitted. To be clear, you can output to a file with an object output stream. If the output is not serialized. It could be messy!

Implementation is the implementation of the Java.io.Serializable interface. This interface does not need to implement any specific methods. Just implements Java.io.Serializable.

The serialization mechanism in Java enables an instance object to be serialized (only the property values of an object are serializable, without serializing what is called a method). The state information is written to a byte stream so that it can be transmitted through the socket, or persisted to the storage database or file system, and then, when needed, reconstructs an identical object through the information in the byte stream.

Generally speaking, to make a class serializable, simply implement the Java.io.Serializable interface.

Related Article

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.