The role of the serializable interface in Java

Source: Internet
Author: User
Tags object serialization

Reprinted from: http://blog.csdn.net/shehun11/article/details/40300439

the so-called Serializable, is the Java provides the common data saving and reading interface. where to read from and where to save is hidden behind the function parameters. In this way, any type that implements the serializable interface can be saved to a file or sent to another location as a data stream over the network. You can also use pipelines to transfer to other programs in your system. This greatly simplifies the design of the class. As long as the design of a save a read function can solve all the problems mentioned above.

The definition of Object serialization:
The object serialization allows you to convert objects that implement the serializable interface into a sequence of bytes that can be fully stored for later re-generation of the original object.

Serialization can not only be done natively, but also via network operation (RMI). This benefit is great----because it automatically masks the differences in the operating system, byte order (people who have developed network programming under UNIX C should know this concept) and so on. For example, an object is generated on the window platform and serialized and then transmitted over a network to a UNIX machine, which can then be properly refactored on this UNIX machine.

The role of the serializable interface in Java

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.