public interface BinaryMarshaller<T>
JNIConfig.Builder
Modifier and Type | Method and Description |
---|---|
default int |
inferSize(T object)
Estimates a size in bytes needed to marshall given object.
|
static <T> BinaryMarshaller<T> |
nullable(BinaryMarshaller<T> forMarshaller)
|
T |
read(BinaryInput input)
Reads the object value from the
input and returns the recreated object. |
void |
write(BinaryOutput output,
T object)
Writes the
object 's value into the output . |
T read(BinaryInput input)
input
and returns the recreated object.void write(BinaryOutput output, T object)
object
's value into the output
.default int inferSize(T object)
BinaryOutput
's buffer.static <T> BinaryMarshaller<T> nullable(BinaryMarshaller<T> forMarshaller)
forMarshaller
by a BinaryMarshaller
handling null
values.
The returned BinaryMarshaller
calls the forMarshaller
only non-null values.