Package org.mariadb.jdbc.codec.list
Class DurationCodec
java.lang.Object
org.mariadb.jdbc.codec.list.DurationCodec
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionboolean
canDecode
(ColumnDefinitionPacket column, Class<?> type) boolean
decodeBinary
(ReadableByteBuf buf, int length, ColumnDefinitionPacket column, Calendar cal) decodeText
(ReadableByteBuf buf, int length, ColumnDefinitionPacket column, Calendar cal) void
encodeBinary
(PacketWriter encoder, Object val, Calendar cal, Long maxLength) private void
encodeDuration
(PacketWriter encoder, Duration value) void
encodeText
(PacketWriter encoder, Context context, Object val, Calendar cal, Long maxLen) int
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
-
DurationCodec
public DurationCodec()
-
-
Method Details
-
className
-
canDecode
-
canEncode
-
decodeText
public Duration decodeText(ReadableByteBuf buf, int length, ColumnDefinitionPacket column, Calendar cal) throws SQLDataException - Specified by:
decodeText
in interfaceCodec<Duration>
- Throws:
SQLDataException
-
decodeBinary
public Duration decodeBinary(ReadableByteBuf buf, int length, ColumnDefinitionPacket column, Calendar cal) throws SQLDataException - Specified by:
decodeBinary
in interfaceCodec<Duration>
- Throws:
SQLDataException
-
encodeText
public void encodeText(PacketWriter encoder, Context context, Object val, Calendar cal, Long maxLen) throws IOException - Specified by:
encodeText
in interfaceCodec<Duration>
- Throws:
IOException
-
encodeBinary
public void encodeBinary(PacketWriter encoder, Object val, Calendar cal, Long maxLength) throws IOException - Specified by:
encodeBinary
in interfaceCodec<Duration>
- Throws:
IOException
-
encodeDuration
- Throws:
IOException
-
getBinaryEncodeType
public int getBinaryEncodeType()- Specified by:
getBinaryEncodeType
in interfaceCodec<Duration>
-