Package org.mariadb.jdbc.codec.list
Class LongCodec
java.lang.Object
org.mariadb.jdbc.codec.list.LongCodec
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionboolean
canDecode
(ColumnDefinitionPacket column, Class<?> type) boolean
decodeBinary
(ReadableByteBuf buffer, int length, ColumnDefinitionPacket column, Calendar cal) long
decodeBinaryLong
(ReadableByteBuf buf, int length, ColumnDefinitionPacket column) decodeText
(ReadableByteBuf buffer, int length, ColumnDefinitionPacket column, Calendar cal) long
decodeTextLong
(ReadableByteBuf buf, int length, ColumnDefinitionPacket column) void
encodeBinary
(PacketWriter encoder, Object value, Calendar cal, Long maxLength) void
encodeText
(PacketWriter encoder, Context context, Object value, Calendar cal, Long maxLen) int
static long
parseNotEmpty
(ReadableByteBuf buf, int length) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.mariadb.jdbc.plugin.Codec
canEncodeLongData, encodeData, encodeLongData
-
Field Details
-
INSTANCE
-
COMPATIBLE_TYPES
-
-
Constructor Details
-
LongCodec
public LongCodec()
-
-
Method Details
-
parseNotEmpty
-
className
-
canDecode
-
canEncode
-
decodeText
public Long decodeText(ReadableByteBuf buffer, int length, ColumnDefinitionPacket column, Calendar cal) throws SQLDataException - Specified by:
decodeText
in interfaceCodec<Long>
- Throws:
SQLDataException
-
decodeTextLong
public long decodeTextLong(ReadableByteBuf buf, int length, ColumnDefinitionPacket column) throws SQLDataException - Throws:
SQLDataException
-
decodeBinary
public Long decodeBinary(ReadableByteBuf buffer, int length, ColumnDefinitionPacket column, Calendar cal) throws SQLDataException - Specified by:
decodeBinary
in interfaceCodec<Long>
- Throws:
SQLDataException
-
decodeBinaryLong
public long decodeBinaryLong(ReadableByteBuf buf, int length, ColumnDefinitionPacket column) throws SQLDataException - Throws:
SQLDataException
-
encodeText
public void encodeText(PacketWriter encoder, Context context, Object value, Calendar cal, Long maxLen) throws IOException - Specified by:
encodeText
in interfaceCodec<Long>
- Throws:
IOException
-
encodeBinary
public void encodeBinary(PacketWriter encoder, Object value, Calendar cal, Long maxLength) throws IOException - Specified by:
encodeBinary
in interfaceCodec<Long>
- Throws:
IOException
-
getBinaryEncodeType
public int getBinaryEncodeType()- Specified by:
getBinaryEncodeType
in interfaceCodec<Long>
-