public interface Serializer<T>
| Modifier and Type | Method and Description |
|---|---|
T |
read(DataInput input)
Reads an object from the specified input stream.
|
default OptionalInt |
size(T object)
Returns the size of the buffer to use for marshalling the specified object, if known.
|
void |
write(DataOutput output,
T value)
Writes the specified object to the specified output stream
|
void write(DataOutput output, T value) throws IOException
output - the data output streamvalue - an object to serializeIOException - if an I/O error occursT read(DataInput input) throws IOException
input - a data input streamIOException - if an I/O error occursdefault OptionalInt size(T object)
Copyright © 2021 JBoss by Red Hat. All rights reserved.