Package org.mariadb.jdbc.codec.list
Class TimestampCodec
- java.lang.Object
-
- org.mariadb.jdbc.codec.list.TimestampCodec
-
-
Field Summary
Fields Modifier and Type Field Description static TimestampCodec
INSTANCE
-
Constructor Summary
Constructors Constructor Description TimestampCodec()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
canDecode(ColumnDefinitionPacket column, Class<?> type)
boolean
canEncode(Object value)
String
className()
Timestamp
decodeBinary(org.mariadb.jdbc.client.ReadableByteBuf buf, int length, ColumnDefinitionPacket column, Calendar calParam)
Timestamp
decodeText(org.mariadb.jdbc.client.ReadableByteBuf buf, int length, ColumnDefinitionPacket column, Calendar calParam)
void
encodeBinary(PacketWriter encoder, Object value, Calendar providedCal, Long maxLength)
void
encodeText(PacketWriter encoder, Context context, Object val, Calendar providedCal, Long maxLen)
int
getBinaryEncodeType()
-
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 Detail
-
INSTANCE
public static final TimestampCodec INSTANCE
-
-
Method Detail
-
canDecode
public boolean canDecode(ColumnDefinitionPacket column, Class<?> type)
-
canEncode
public boolean canEncode(Object value)
-
decodeText
public Timestamp decodeText(org.mariadb.jdbc.client.ReadableByteBuf buf, int length, ColumnDefinitionPacket column, Calendar calParam) throws SQLDataException
- Specified by:
decodeText
in interfaceCodec<Timestamp>
- Throws:
SQLDataException
-
decodeBinary
public Timestamp decodeBinary(org.mariadb.jdbc.client.ReadableByteBuf buf, int length, ColumnDefinitionPacket column, Calendar calParam) throws SQLDataException
- Specified by:
decodeBinary
in interfaceCodec<Timestamp>
- Throws:
SQLDataException
-
encodeText
public void encodeText(PacketWriter encoder, Context context, Object val, Calendar providedCal, Long maxLen) throws IOException
- Specified by:
encodeText
in interfaceCodec<Timestamp>
- Throws:
IOException
-
encodeBinary
public void encodeBinary(PacketWriter encoder, Object value, Calendar providedCal, Long maxLength) throws IOException
- Specified by:
encodeBinary
in interfaceCodec<Timestamp>
- Throws:
IOException
-
getBinaryEncodeType
public int getBinaryEncodeType()
- Specified by:
getBinaryEncodeType
in interfaceCodec<Timestamp>
-
-