Package org.mariadb.jdbc.plugin
Interface Codec<T>
-
- All Known Implementing Classes:
BigDecimalCodec,BigIntegerCodec,BitSetCodec,BlobCodec,BooleanCodec,ByteArrayCodec,ByteCodec,ClobCodec,DateCodec,DoubleCodec,DurationCodec,FloatCodec,GeometryCollectionCodec,IntCodec,LineStringCodec,LocalDateCodec,LocalDateTimeCodec,LocalTimeCodec,LongCodec,MultiLinestringCodec,MultiPointCodec,MultiPolygonCodec,PointCodec,PolygonCodec,ReaderCodec,ShortCodec,StreamCodec,StringCodec,TimeCodec,TimestampCodec,ZonedDateTimeCodec
public interface Codec<T>
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description booleancanDecode(ColumnDefinitionPacket column, Class<?> type)booleancanEncode(Object value)default booleancanEncodeLongData()StringclassName()TdecodeBinary(org.mariadb.jdbc.client.ReadableByteBuf buffer, int length, ColumnDefinitionPacket column, Calendar cal)TdecodeText(org.mariadb.jdbc.client.ReadableByteBuf buffer, int length, ColumnDefinitionPacket column, Calendar cal)voidencodeBinary(PacketWriter encoder, Object value, Calendar cal, Long length)default byte[]encodeData(T value, Long length)default voidencodeLongData(PacketWriter encoder, T value, Long length)voidencodeText(PacketWriter encoder, Context context, Object value, Calendar cal, Long length)intgetBinaryEncodeType()
-
-
-
Method Detail
-
className
String className()
-
canDecode
boolean canDecode(ColumnDefinitionPacket column, Class<?> type)
-
canEncode
boolean canEncode(Object value)
-
decodeText
T decodeText(org.mariadb.jdbc.client.ReadableByteBuf buffer, int length, ColumnDefinitionPacket column, Calendar cal) throws SQLDataException
- Throws:
SQLDataException
-
decodeBinary
T decodeBinary(org.mariadb.jdbc.client.ReadableByteBuf buffer, int length, ColumnDefinitionPacket column, Calendar cal) throws SQLDataException
- Throws:
SQLDataException
-
encodeText
void encodeText(PacketWriter encoder, Context context, Object value, Calendar cal, Long length) throws IOException, SQLException
- Throws:
IOExceptionSQLException
-
encodeBinary
void encodeBinary(PacketWriter encoder, Object value, Calendar cal, Long length) throws IOException, SQLException
- Throws:
IOExceptionSQLException
-
canEncodeLongData
default boolean canEncodeLongData()
-
encodeLongData
default void encodeLongData(PacketWriter encoder, T value, Long length) throws IOException, SQLException
- Throws:
IOExceptionSQLException
-
encodeData
default byte[] encodeData(T value, Long length) throws IOException, SQLException
- Throws:
IOExceptionSQLException
-
getBinaryEncodeType
int getBinaryEncodeType()
-
-