What is serialization and deserialization in Java

Source: Internet
Author: User
Tags serialization
Serialization: The ability to represent an object in a binary representation.
Like my first byte denotes what attribute noun, the second byte represents what property value, the first few fields represent a few attributes, and so on.
And this binary can be written to the hard disk or transmitted over the network without destroying his structure. A generic remote method call is an object that must be able to serialize.
Implementation of serialization requires the implementation of the Java.io.Serializable interface. But we can add a keyword to some of the attributes so that this property is not serialized. Specific keywords How to write I forgot, you can check.
Deserialization: This is done by restoring the serialized field to the object itself. However, fields that are not serialized will not be restored.
Attributes such as password information for general personnel require that the identity be not serialized. Prevent network transmissions from being stolen, especially web programs.

Nomad
Links: https://www.zhihu.com/question/47794528/answer/107683459
Source: Know
Copyright belongs to the author, please contact the author for authorization.

What is serialization and deserialization in Java

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.