The function of the context is to keep track of objects and class data that have already been read, allowing the data to contain simple references to other objects. This allows, for instance, the serialization of objects graphs that contains cycles.
Only objects that implement java.io.Serializable
can be read by a DeserializationContext. Currently, custom deserialization (through java.io.Externalizable
or readObject
method) as well as other advanced serialization features are not supported.
The data in the ByteBuffer is not self-contained, because it may refer to objects or classes that have been previously read. Because of that, data written with a single SerializationContext should be read by a single DeserializationContext. @author Leonardo "Bubble" Mesquita @see java.nio.ByteBuffer @see java.io.Serializable @see com.bubble.serializer.SerializationContext
|
|