T
- type of objects deserializedpublic interface BytesReader<T> extends Marshallable
ReadBytesMarshallable
.BytesWriter
EMPTY
DISCARD
Modifier and Type | Method and Description |
---|---|
T |
read(Bytes in,
T using)
Reads and returns the object from
RandomCommon.readPosition() (i. |
writeMarshallable, writeValue
readMarshallable
@NotNull T read(Bytes in, T using)
RandomCommon.readPosition()
(i. e. the current position)
in the given in
. Should attempt to reuse the given using
object, i. e. to
read the deserialized data into the given object. If it is possible, this object then
returned from this method back. If it is impossible for any reason, a new object should be
created and returned. The given using
object could be null
, in this case this
method, of cause, should create a new object.
This method should increment the position in the given Bytes
, i. e. consume the
read bytes. in
bytes shouldn't be written.
in
- the Bytes
to read the object fromusing
- the object to read the deserialized data into, could be null
Copyright © 2016. All rights reserved.