Modifier and Type | Method and Description |
---|---|
default Integer |
decode(ByteBuffer bytes,
ProtocolVersion protocolVersion)
Decodes a value from the binary format of the CQL type handled by this codec.
|
int |
decodePrimitive(ByteBuffer value,
ProtocolVersion protocolVersion) |
default ByteBuffer |
encode(Integer value,
ProtocolVersion protocolVersion)
Encodes the given value in the binary format of the CQL type handled by this codec.
|
ByteBuffer |
encodePrimitive(int value,
ProtocolVersion protocolVersion) |
accepts, accepts, accepts, accepts, format, getCqlType, getJavaType, parse
@Nullable ByteBuffer encodePrimitive(int value, @NonNull ProtocolVersion protocolVersion)
int decodePrimitive(@Nullable ByteBuffer value, @NonNull ProtocolVersion protocolVersion)
@Nullable default ByteBuffer encode(@Nullable Integer value, @NonNull ProtocolVersion protocolVersion)
TypeCodec
null
input as the equivalent of an
empty collection.
@Nullable default Integer 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.