(record) Java serialization and deserialization

Source: Internet
Author: User

When learning the Jedis part of Redis, use the serialization tool to Protostuff (Protobuf's Java client). When I first saw the serialization of these words, I felt confused. So, referring to a lot of information on the Internet, understand the Java serialization and deserialization (reference 7992448/), the role of Protobuf and the use of Java in the method.

What is 1.Java serialization and deserialization:

  Java Serialization refers to the process of converting a Java object to a sequence of bytes, while Java deserialization refers to the process of reverting a sequence of bytes to a Java object.

2. Why Java serialization and deserialization is required

Two of the most important applications of serialization are:

  • Use serialization to save the collection of objects to a disk file and obtain them as they are stored.
  • A collection of objects is routed over the network to another computer.

3. Why can I use serialization and deserialization only

  • In a disk file, the memory address of the object cannot be saved and restored because it may occupy a completely different memory address than the original when the object is overloaded.
  • In network transmissions, the memory addresses that the objects occupy are completely different when communicating between different processors.

4. The benefits of serialization and deserialization

Serialization means that each object is saved with a sequence number , which is what this mechanism is called

  

(record) Java serialization and deserialization

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.