public interface DataSerializable
Externalizable
and relies on reflection to create instances using class names.
Conforming classes must provide a no-arguments constructor to facilitate the creation of their instances during the deserialization. Anonymous, local and non-static member classes can't satisfy this requirement since their constructors are always accepting an instance of the enclosing class as an implicit argument, therefore they must be avoided.
IdentifiedDataSerializable
,
Portable
,
VersionedPortable
Modifier and Type | Method and Description |
---|---|
void |
readData(ObjectDataInput in)
Reads fields from the input stream
|
void |
writeData(ObjectDataOutput out)
Writes object fields to output stream
|
void writeData(ObjectDataOutput out) throws IOException
out
- outputIOException
- if an I/O error occurs. In particular,
an IOException
may be thrown if the
output stream has been closed.void readData(ObjectDataInput in) throws IOException
in
- inputIOException
- if an I/O error occurs. In particular,
an IOException
may be thrown if the
input stream has been closed.Copyright © 2024 Hazelcast, Inc.. All rights reserved.