Java – size of serialized null values

I have to send a complex object over the network. These references are almost null, but I want to know the size of the object. There is this null reference inside

What is the size of the null value contained in the serialized object?

I'm evaluating how to better change the communication protocol, send a simpler object at the cost of not reusing complex objects, and make several simple objects for each type of communication

Solution

Null itself should be 1 byte (0x70), as shown in object serialization stream protocol

The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
分享
二维码
< <上一篇
下一篇>>