public class GenericEnumMarshaller<E> extends Object implements BytesMarshaller<E>
| Constructor and Description |
|---|
GenericEnumMarshaller(Class<E> classMarshaled,
int capacity) |
| Modifier and Type | Method and Description |
|---|---|
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. |
void |
write(Bytes bytes,
E e)
Write the object out to the
bytes. |
public void write(@NotNull Bytes bytes, @Nullable E e)
BytesMarshallerbytes.write in interface BytesMarshaller<E>bytes - to write toe - the object to write@Nullable public E read(@NotNull Bytes bytes)
BytesMarshallerbytes.read in interface BytesMarshaller<E>bytes - to read@Nullable public E read(Bytes bytes, @Nullable E e)
BytesMarshallerbytes, reusing the given object, if possible.read in interface BytesMarshaller<E>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.