Package org.mariadb.jdbc.codec.list

## Class IntCodec

- java.lang.Object
- - org.mariadb.jdbc.codec.list.IntCodec

All Implemented Interfaces:
  `org.mariadb.jdbc.codec.Codec<Integer>`

    public class IntCodec
    extends Object
    implements org.mariadb.jdbc.codec.Codec<Integer>

### Field Summary

Fields
`static IntCodec` `INSTANCE`

### Constructor Summary

Constructors
`IntCodec()`

### Method Summary

All Methods Instance Methods Concrete Methods
`boolean` `canDecode​(ColumnDefinitionPacket column, Class<?> type)`
`boolean` `canEncode​(Object value)`
`String` `className()`
`Integer` `decodeBinary​(org.mariadb.jdbc.client.ReadableByteBuf buffer, int length, ColumnDefinitionPacket column, Calendar cal)`
`int` `decodeBinaryInt​(org.mariadb.jdbc.client.ReadableByteBuf buf, int length, ColumnDefinitionPacket column)`
`Integer` `decodeText​(org.mariadb.jdbc.client.ReadableByteBuf buffer, int length, ColumnDefinitionPacket column, Calendar cal)`
`int` `decodeTextInt​(org.mariadb.jdbc.client.ReadableByteBuf buf, int length, ColumnDefinitionPacket column)`
`void` `encodeBinary​(PacketWriter encoder, Object value, Calendar cal, Long maxLength)`
`void` `encodeText​(PacketWriter encoder, Context context, Object value, Calendar cal, 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.codec.Codec

`canEncodeLongData, encodeData, encodeLongData`

### Field Detail

#### INSTANCE

    public static final IntCodec INSTANCE

### Constructor Detail

#### IntCodec

    public IntCodec()

### Method Detail

#### className

    public String className()

Specified by:
  `className` in interface `org.mariadb.jdbc.codec.Codec<Integer>`

#### canDecode

    public boolean canDecode​(ColumnDefinitionPacket column,
                             Class<?> type)

Specified by:
  `canDecode` in interface `org.mariadb.jdbc.codec.Codec<Integer>`

#### canEncode

    public boolean canEncode​(Object value)

Specified by:
  `canEncode` in interface `org.mariadb.jdbc.codec.Codec<Integer>`

#### decodeText

    public Integer decodeText​(org.mariadb.jdbc.client.ReadableByteBuf buffer,
                              int length,
                              ColumnDefinitionPacket column,
                              Calendar cal)
                       throws SQLDataException

Specified by:
  `decodeText` in interface `org.mariadb.jdbc.codec.Codec<Integer>`
Throws:
  `SQLDataException`

#### decodeTextInt

    public int decodeTextInt​(org.mariadb.jdbc.client.ReadableByteBuf buf,
                             int length,
                             ColumnDefinitionPacket column)
                      throws SQLDataException

Throws:
  `SQLDataException`

#### decodeBinary

    public Integer decodeBinary​(org.mariadb.jdbc.client.ReadableByteBuf buffer,
                                int length,
                                ColumnDefinitionPacket column,
                                Calendar cal)
                         throws SQLDataException

Specified by:
  `decodeBinary` in interface `org.mariadb.jdbc.codec.Codec<Integer>`
Throws:
  `SQLDataException`

#### decodeBinaryInt

    public int decodeBinaryInt​(org.mariadb.jdbc.client.ReadableByteBuf buf,
                               int length,
                               ColumnDefinitionPacket column)
                        throws SQLDataException

Throws:
  `SQLDataException`

#### encodeText

    public void encodeText​(PacketWriter encoder,
                           Context context,
                           Object value,
                           Calendar cal,
                           Long maxLen)
                    throws IOException

Specified by:
  `encodeText` in interface `org.mariadb.jdbc.codec.Codec<Integer>`
Throws:
  `IOException`

#### encodeBinary

    public void encodeBinary​(PacketWriter encoder,
                             Object value,
                             Calendar cal,
                             Long maxLength)
                      throws IOException

Specified by:
  `encodeBinary` in interface `org.mariadb.jdbc.codec.Codec<Integer>`
Throws:
  `IOException`

#### getBinaryEncodeType

    public int getBinaryEncodeType()

Specified by:
  `getBinaryEncodeType` in interface `org.mariadb.jdbc.codec.Codec<Integer>`