public class StringMarshaller extends Object implements CompactBytesMarshaller<String>
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 |
|---|
StringMarshaller(int size) |
| Modifier and Type | Method and Description |
|---|---|
byte |
code() |
String |
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,
String s)
Write the object out to the
bytes. |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitreadpublic void write(@NotNull Bytes bytes, String s)
BytesMarshallerbytes.write in interface BytesMarshaller<String>bytes - to write tos - the object to write@Nullable public String read(@NotNull Bytes bytes)
BytesMarshallerbytes.read in interface BytesMarshaller<String>bytes - to readpublic byte code()
code in interface CompactBytesMarshaller<String>@Nullable public final 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.