Package org.mariadb.jdbc.plugin.codec
Class ByteCodec
- java.lang.Object
-
- org.mariadb.jdbc.plugin.codec.ByteCodec
-
-
Constructor Summary
Constructors Constructor Description ByteCodec()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description booleancanDecode(org.mariadb.jdbc.client.Column column, Class<?> type)booleancanEncode(Object value)StringclassName()BytedecodeBinary(org.mariadb.jdbc.client.ReadableByteBuf buffer, int length, org.mariadb.jdbc.client.Column column, Calendar cal)bytedecodeBinaryByte(org.mariadb.jdbc.client.ReadableByteBuf buf, int length, org.mariadb.jdbc.client.Column column)BytedecodeText(org.mariadb.jdbc.client.ReadableByteBuf buffer, int length, org.mariadb.jdbc.client.Column column, Calendar cal)bytedecodeTextByte(org.mariadb.jdbc.client.ReadableByteBuf buf, int length, org.mariadb.jdbc.client.Column column)voidencodeBinary(Writer encoder, Object value, Calendar cal, Long maxLength)voidencodeText(Writer encoder, org.mariadb.jdbc.client.Context context, Object value, Calendar cal, Long maxLength)intgetBinaryEncodeType()static longparseBit(org.mariadb.jdbc.client.ReadableByteBuf buf, int length)-
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 ByteCodec INSTANCE
-
-
Method Detail
-
parseBit
public static long parseBit(org.mariadb.jdbc.client.ReadableByteBuf buf, int length)
-
canDecode
public boolean canDecode(org.mariadb.jdbc.client.Column column, Class<?> type)
-
decodeText
public Byte decodeText(org.mariadb.jdbc.client.ReadableByteBuf buffer, int length, org.mariadb.jdbc.client.Column column, Calendar cal) throws SQLDataException
- Specified by:
decodeTextin interfaceCodec<Byte>- Throws:
SQLDataException
-
decodeTextByte
public byte decodeTextByte(org.mariadb.jdbc.client.ReadableByteBuf buf, int length, org.mariadb.jdbc.client.Column column) throws SQLDataException- Throws:
SQLDataException
-
decodeBinary
public Byte decodeBinary(org.mariadb.jdbc.client.ReadableByteBuf buffer, int length, org.mariadb.jdbc.client.Column column, Calendar cal) throws SQLDataException
- Specified by:
decodeBinaryin interfaceCodec<Byte>- Throws:
SQLDataException
-
decodeBinaryByte
public byte decodeBinaryByte(org.mariadb.jdbc.client.ReadableByteBuf buf, int length, org.mariadb.jdbc.client.Column column) throws SQLDataException- Throws:
SQLDataException
-
encodeText
public void encodeText(Writer encoder, org.mariadb.jdbc.client.Context context, Object value, Calendar cal, Long maxLength) throws IOException
- Specified by:
encodeTextin interfaceCodec<Byte>- Throws:
IOException
-
encodeBinary
public void encodeBinary(Writer encoder, Object value, Calendar cal, Long maxLength) throws IOException
- Specified by:
encodeBinaryin interfaceCodec<Byte>- Throws:
IOException
-
getBinaryEncodeType
public int getBinaryEncodeType()
- Specified by:
getBinaryEncodeTypein interfaceCodec<Byte>
-
-