public class BytesMarshallableMarshaller<E extends BytesMarshallable> extends Object implements BytesMarshaller<E>
Constructor and Description |
---|
BytesMarshallableMarshaller(Class<E> classMarshaled) |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object obj) |
protected E |
getInstance() |
int |
hashCode() |
Class<E> |
marshaledClass() |
E |
read(Bytes bytes)
Reads and returns an object from
bytes . |
E |
read(Bytes bytes,
E e)
Reads and returns an object from
bytes , reusing the given object, if possible. |
String |
toString() |
void |
write(Bytes bytes,
E e)
Write the object out to the
bytes . |
public void write(@NotNull Bytes bytes, @NotNull E e)
BytesMarshaller
bytes
.write
in interface BytesMarshaller<E extends BytesMarshallable>
bytes
- to write toe
- the object to writepublic E read(@NotNull Bytes bytes)
BytesMarshaller
bytes
.read
in interface BytesMarshaller<E extends BytesMarshallable>
bytes
- to read@Nullable public E read(Bytes bytes, @Nullable E e)
BytesMarshaller
bytes
, reusing the given object, if possible.read
in interface BytesMarshaller<E extends BytesMarshallable>
bytes
- to reade
- an object to reuse, if possible. null
could be passed, in this case
a new object should be allocated anyway.Copyright © 2019. All rights reserved.