Modifier and Type | Method and Description |
---|---|
default Byte |
decode(ByteBuffer bytes,
ProtocolVersion protocolVersion)
Decodes a value from the binary format of the CQL type handled by this codec.
|
byte |
decodePrimitive(ByteBuffer value,
ProtocolVersion protocolVersion) |
default ByteBuffer |
encode(Byte value,
ProtocolVersion protocolVersion)
Encodes the given value in the binary format of the CQL type handled by this codec.
|
ByteBuffer |
encodePrimitive(byte value,
ProtocolVersion protocolVersion) |
accepts, accepts, accepts, accepts, format, getCqlType, getJavaType, parse
@Nullable ByteBuffer encodePrimitive(byte value, @NonNull ProtocolVersion protocolVersion)
byte decodePrimitive(@Nullable ByteBuffer value, @NonNull ProtocolVersion protocolVersion)
@Nullable default ByteBuffer encode(@Nullable Byte value, @NonNull ProtocolVersion protocolVersion)
TypeCodec
null
input as the equivalent of an
empty collection.
@Nullable default Byte decode(@Nullable ByteBuffer bytes, @NonNull ProtocolVersion protocolVersion)
TypeCodec
null
or a default value for the corresponding Java type, if
applicable;
null
; they should return
empty collections instead (the driver's default collection codecs all comply with this
rule);
ByteBuffer
should never be consumed by read operations that modify
its current position; if necessary, ByteBuffer.duplicate()
duplicate} it before
consuming.
Copyright © 2017–2024. All rights reserved.