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

### Method Detail

#### className

    String className()

#### canDecode

    boolean canDecode​(org.mariadb.jdbc.client.Column column,
                      Class<?> type)

#### canEncode

    boolean canEncode​(Object value)

#### decodeText

    T decodeText​(org.mariadb.jdbc.client.ReadableByteBuf buffer,
                 int length,
                 org.mariadb.jdbc.client.Column column,
                 Calendar cal)
          throws SQLDataException

Throws:
  `SQLDataException`

#### decodeBinary

    T decodeBinary​(org.mariadb.jdbc.client.ReadableByteBuf buffer,
                   int length,
                   org.mariadb.jdbc.client.Column column,
                   Calendar cal)
            throws SQLDataException

Throws:
  `SQLDataException`

#### encodeText

    void encodeText​(Writer encoder,
                    org.mariadb.jdbc.client.Context context,
                    Object value,
                    Calendar cal,
                    Long length)
             throws IOException,
                    SQLException

Throws:
  `IOException`
  `SQLException`

#### encodeBinary

    void encodeBinary​(Writer encoder,
                      Object value,
                      Calendar cal,
                      Long length)
               throws IOException,
                      SQLException

Throws:
  `IOException`
  `SQLException`

#### canEncodeLongData

    default boolean canEncodeLongData()

#### encodeLongData

    default void encodeLongData​(Writer 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()