Package org.mariadb.jdbc.codec.list

## Class FloatCodec

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

All Implemented Interfaces:
  `Codec<Float>`

    public class FloatCodec
    extends Object
    implements Codec<Float>

### Field Summary

Fields
`static FloatCodec` `INSTANCE`

### Constructor Summary

Constructors
`FloatCodec()`

### Method Summary

All Methods Instance Methods Concrete Methods
`boolean` `canDecode​(ColumnDefinitionPacket column, Class<?> type)`
`boolean` `canEncode​(Object value)`
`String` `className()`
`Float` `decodeBinary​(org.mariadb.jdbc.client.ReadableByteBuf buffer, int length, ColumnDefinitionPacket column, Calendar cal)`
`float` `decodeBinaryFloat​(org.mariadb.jdbc.client.ReadableByteBuf buf, int length, ColumnDefinitionPacket column)`
`Float` `decodeText​(org.mariadb.jdbc.client.ReadableByteBuf buffer, int length, ColumnDefinitionPacket column, Calendar cal)`
`float` `decodeTextFloat​(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.plugin.Codec

`canEncodeLongData, encodeData, encodeLongData`

### Field Detail

#### INSTANCE

    public static final FloatCodec INSTANCE

### Constructor Detail

#### FloatCodec

    public FloatCodec()

### Method Detail

#### className

    public String className()

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

#### canDecode

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

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

#### canEncode

    public boolean canEncode​(Object value)

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

#### decodeText

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

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

#### decodeTextFloat

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

Throws:
  `SQLDataException`

#### decodeBinary

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

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

#### decodeBinaryFloat

    public float decodeBinaryFloat​(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 `Codec<Float>`
Throws:
  `IOException`

#### encodeBinary

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

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

#### getBinaryEncodeType

    public int getBinaryEncodeType()

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