Package org.mariadb.jdbc.codec.list
Class ClobCodec
java.lang.Object
org.mariadb.jdbc.codec.list.ClobCodec
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionboolean
canDecode
(ColumnDefinitionPacket column, Class<?> type) boolean
boolean
decodeBinary
(ReadableByteBuf buf, int length, ColumnDefinitionPacket column, Calendar cal) decodeText
(ReadableByteBuf buf, int length, ColumnDefinitionPacket column, Calendar cal) void
encodeBinary
(PacketWriter encoder, Object value, Calendar cal, Long maxLength) byte[]
encodeData
(Clob value, Long maxLength) void
encodeLongData
(PacketWriter encoder, Clob value, Long maxLength) void
encodeText
(PacketWriter encoder, Context context, Object value, Calendar cal, Long maxLength) int
private Clob
getClob
(ReadableByteBuf buf, int length, ColumnDefinitionPacket column)
-
Field Details
-
INSTANCE
-
COMPATIBLE_TYPES
-
-
Constructor Details
-
ClobCodec
public ClobCodec()
-
-
Method Details
-
className
-
canDecode
-
canEncode
-
decodeText
public Clob decodeText(ReadableByteBuf buf, int length, ColumnDefinitionPacket column, Calendar cal) throws SQLDataException - Specified by:
decodeText
in interfaceCodec<Clob>
- Throws:
SQLDataException
-
getClob
private Clob getClob(ReadableByteBuf buf, int length, ColumnDefinitionPacket column) throws SQLDataException - Throws:
SQLDataException
-
decodeBinary
public Clob decodeBinary(ReadableByteBuf buf, int length, ColumnDefinitionPacket column, Calendar cal) throws SQLDataException - Specified by:
decodeBinary
in interfaceCodec<Clob>
- Throws:
SQLDataException
-
encodeText
public void encodeText(PacketWriter encoder, Context context, Object value, Calendar cal, Long maxLength) throws IOException, SQLException - Specified by:
encodeText
in interfaceCodec<Clob>
- Throws:
IOException
SQLException
-
encodeBinary
public void encodeBinary(PacketWriter encoder, Object value, Calendar cal, Long maxLength) throws IOException, SQLException - Specified by:
encodeBinary
in interfaceCodec<Clob>
- Throws:
IOException
SQLException
-
encodeLongData
public void encodeLongData(PacketWriter encoder, Clob value, Long maxLength) throws IOException, SQLException - Specified by:
encodeLongData
in interfaceCodec<Clob>
- Throws:
IOException
SQLException
-
encodeData
- Specified by:
encodeData
in interfaceCodec<Clob>
- Throws:
IOException
SQLException
-
canEncodeLongData
public boolean canEncodeLongData()- Specified by:
canEncodeLongData
in interfaceCodec<Clob>
-
getBinaryEncodeType
public int getBinaryEncodeType()- Specified by:
getBinaryEncodeType
in interfaceCodec<Clob>
-