Package org.mariadb.jdbc.plugin.codec

## Class TimestampCodec

- java.lang.Object
- - org.mariadb.jdbc.plugin.codec.TimestampCodec

All Implemented Interfaces:
  `Codec<Timestamp>`

    public class TimestampCodec
    extends Object
    implements Codec<Timestamp>

### Field Summary

Fields
`static TimestampCodec` `INSTANCE`

### Constructor Summary

Constructors
`TimestampCodec()`

### Method Summary

All Methods Instance Methods Concrete Methods
`boolean` `canDecode​(org.mariadb.jdbc.client.Column column, Class<?> type)`
`boolean` `canEncode​(Object value)`
`String` `className()`
`Timestamp` `decodeBinary​(org.mariadb.jdbc.client.ReadableByteBuf buf, int length, org.mariadb.jdbc.client.Column column, Calendar calParam)`
`Timestamp` `decodeText​(org.mariadb.jdbc.client.ReadableByteBuf buf, int length, org.mariadb.jdbc.client.Column column, Calendar calParam)`
`void` `encodeBinary​(Writer encoder, Object value, Calendar providedCal, Long maxLength)`
`void` `encodeText​(Writer encoder, org.mariadb.jdbc.client.Context context, Object val, Calendar providedCal, Long maxLen)`
`int` `getBinaryEncodeType()`

### 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 TimestampCodec INSTANCE

### Constructor Detail

#### TimestampCodec

    public TimestampCodec()

### Method Detail

#### className

    public String className()

Specified by:
  `className` in interface `Codec<Timestamp>`

#### canDecode

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

Specified by:
  `canDecode` in interface `Codec<Timestamp>`

#### canEncode

    public boolean canEncode​(Object value)

Specified by:
  `canEncode` in interface `Codec<Timestamp>`

#### decodeText

    public Timestamp decodeText​(org.mariadb.jdbc.client.ReadableByteBuf buf,
                                int length,
                                org.mariadb.jdbc.client.Column column,
                                Calendar calParam)
                         throws SQLDataException

Specified by:
  `decodeText` in interface `Codec<Timestamp>`
Throws:
  `SQLDataException`

#### decodeBinary

    public Timestamp decodeBinary​(org.mariadb.jdbc.client.ReadableByteBuf buf,
                                  int length,
                                  org.mariadb.jdbc.client.Column column,
                                  Calendar calParam)
                           throws SQLDataException

Specified by:
  `decodeBinary` in interface `Codec<Timestamp>`
Throws:
  `SQLDataException`

#### encodeText

    public void encodeText​(Writer encoder,
                           org.mariadb.jdbc.client.Context context,
                           Object val,
                           Calendar providedCal,
                           Long maxLen)
                    throws IOException

Specified by:
  `encodeText` in interface `Codec<Timestamp>`
Throws:
  `IOException`

#### encodeBinary

    public void encodeBinary​(Writer encoder,
                             Object value,
                             Calendar providedCal,
                             Long maxLength)
                      throws IOException

Specified by:
  `encodeBinary` in interface `Codec<Timestamp>`
Throws:
  `IOException`

#### getBinaryEncodeType

    public int getBinaryEncodeType()

Specified by:
  `getBinaryEncodeType` in interface `Codec<Timestamp>`