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 boolean
canDecode(ColumnDefinitionPacket column, Class<?> type)
boolean
canEncode(Object value)
default boolean
canEncodeLongData()
String
className()
T
decodeBinary(org.mariadb.jdbc.client.ReadableByteBuf buffer, int length, ColumnDefinitionPacket column, Calendar cal)
T
decodeText(org.mariadb.jdbc.client.ReadableByteBuf buffer, int length, ColumnDefinitionPacket column, Calendar cal)
void
encodeBinary(PacketWriter encoder, Object value, Calendar cal, Long length)
default byte[]
encodeData(T value, Long length)
default void
encodeLongData(PacketWriter encoder, T value, Long length)
void
encodeText(PacketWriter encoder, Context context, Object value, Calendar cal, Long length)
int
getBinaryEncodeType()
-
-
-
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:
IOException
SQLException
-
encodeBinary
void encodeBinary(PacketWriter encoder, Object value, Calendar cal, Long length) throws IOException, SQLException
- Throws:
IOException
SQLException
-
canEncodeLongData
default boolean canEncodeLongData()
-
encodeLongData
default void encodeLongData(PacketWriter encoder, T value, Long length) throws IOException, SQLException
- Throws:
IOException
SQLException
-
encodeData
default byte[] encodeData(T value, Long length) throws IOException, SQLException
- Throws:
IOException
SQLException
-
getBinaryEncodeType
int getBinaryEncodeType()
-
-