public class DateMarshaller extends Object implements CompactBytesMarshaller<Date>
BYTE_BUFFER_CODE, CLASS_CODE, DATE_CODE, DOUBLE_CODE, INT_CODE, LIST_CODE, LONG_CODE, MAP_CODE, SET_CODE, STRING_CODE, STRINGZ_CODE, STRINGZ_MAP_CODE| Constructor and Description |
|---|
DateMarshaller(int size) |
| Modifier and Type | Method and Description |
|---|---|
byte |
code() |
Date |
read(Bytes bytes)
Reads and returns an object from
bytes. |
Date |
read(Bytes bytes,
Date date)
Reads and returns an object from
bytes, reusing the given object, if possible. |
void |
write(Bytes bytes,
Date date)
Write the object out to the
bytes. |
public void write(@NotNull Bytes bytes, @NotNull Date date)
BytesMarshallerbytes.write in interface BytesMarshaller<Date>bytes - to write todate - the object to write@Nullable public Date read(@NotNull Bytes bytes)
BytesMarshallerbytes.read in interface BytesMarshaller<Date>bytes - to read@Nullable public Date read(Bytes bytes, @Nullable Date date)
BytesMarshallerbytes, reusing the given object, if possible.read in interface BytesMarshaller<Date>bytes - to readdate - an object to reuse, if possible. null could be passed, in this case
a new object should be allocated anyway.public byte code()
code in interface CompactBytesMarshaller<Date>Copyright © 2019. All rights reserved.