public enum ByteBufferZMarshaller extends Enum<ByteBufferZMarshaller> implements CompactBytesMarshaller<ByteBuffer>
Enum Constant and Description |
---|
INSTANCE |
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
Modifier and Type | Method and Description |
---|---|
byte |
code() |
protected ByteBuffer |
newByteBuffer(int length) |
ByteBuffer |
read(Bytes bytes)
Reads and returns an object from
bytes . |
ByteBuffer |
read(Bytes bytes,
ByteBuffer byteBuffer)
Reads and returns an object from
bytes , reusing the given object, if possible. |
static ByteBufferZMarshaller |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static ByteBufferZMarshaller[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
void |
write(Bytes bytes,
ByteBuffer byteBuffer)
Write the object out to the
bytes . |
public static final ByteBufferZMarshaller INSTANCE
public static ByteBufferZMarshaller[] values()
for (ByteBufferZMarshaller c : ByteBufferZMarshaller.values()) System.out.println(c);
public static ByteBufferZMarshaller valueOf(String name)
name
- the name of the enum constant to be returned.IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is nullpublic byte code()
code
in interface CompactBytesMarshaller<ByteBuffer>
public void write(Bytes bytes, ByteBuffer byteBuffer)
BytesMarshaller
bytes
.write
in interface BytesMarshaller<ByteBuffer>
bytes
- to write tobyteBuffer
- the object to writepublic ByteBuffer read(Bytes bytes)
BytesMarshaller
bytes
.read
in interface BytesMarshaller<ByteBuffer>
bytes
- to readpublic ByteBuffer read(Bytes bytes, @Nullable ByteBuffer byteBuffer)
BytesMarshaller
bytes
, reusing the given object, if possible.read
in interface BytesMarshaller<ByteBuffer>
bytes
- to readbyteBuffer
- an object to reuse, if possible. null
could be passed, in this case
a new object should be allocated anyway.protected ByteBuffer newByteBuffer(int length)
Copyright © 2019. All rights reserved.