What serialization format is used by Java?

In the RMI program, I want to implement the Serializable interface for serializing objects received from the server. Does Java 6 use the built-in serialization format? I wanted to know if there is a specific name for the serialization format.

+6
source share
2 answers

Yes, Java has its own binary serialization format. And I don’t think it has a name other than Java serialization [format | Protocol].

+7
source

To do this, you must implement the Serializable interface, yes. But this does not guarantee that the object will be correctly serialized if you use complex data structures. If your object consists of Java SE components, I don’t think that you will have problems, your objects will be serialized using reflection by the RMI system.

0
source

Source: https://habr.com/ru/post/892411/


All Articles