The role of Java serialization

Source: Internet
Author: User



Many people think that the role of Java serialization has the following two aspects:

1) Permanently save the byte sequence of the object to the hard disk (usually stored in a file);

2) A sequence of bytes that transmits an object over the network.

But I have a question: in what circumstances will the first function be used? What happens to the second role?


For:

Put your data into a different time and/or place, and continue to use it.

Another time, like save a disk.

Another place, like a network transmission.

Of course, there are a lot of ways to achieve "change time/Place"

Positive solution ... The real self-serialization is still relatively small, many of the framework has been done. Serialization-like features are implemented in many ways, not necessarily by using serialization:

For:

1) When using Tomcat to develop Java EE related projects, when we close Tomcat, the corresponding session objects are stored on the hard disk, if we want to restart the tomcat in the


When it is possible to read the contents of the corresponding session from Tomcat, then the content stored in the session must implement the related serialization operation.


This article from "Jianbo" blog, reproduced please contact the author!

The role of Java serialization

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.