Summary of serialization and deserialization of Java objects

Source: Internet
Author: User

Serialization and deserialization of Java objects; tell us something about serialization & deserialization

When two processes for remote communication, each other can send various types of data, such as text, pictures, voice and video, regardless of any type, will eventually be in the form of binary sequences on the network transmission; so that's the problem. can a Java object be sent to another process between two processes? The answer must be yes, if we need to convert the Java object to a sequence of bytes before sending it, then the receiver will return the byte sequence to the Java object. So converting this Java object to a sequence of bytes is called serialization , and the byte sequence is reverted to a Java object called deserialization.

    Note: Only objects with classes that implement the serializable or Externalizable interface can be serialized, otherwise ObjectOutputStream's WriteObject (Object obj) method throws IOException

The next article gives you a code to understand serialization & deserialization (asleep?? Good night!! )

    

Summary of serialization and deserialization of Java objects

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.