com.mysql.cj.protocol

## Interface ValueDecoder

    public interface ValueDecoder

A value decoder is responsible for interpreting a byte array as a value. The type of the value is encoded in the method call. After decoding, the value decoder passes an intermediate representation of the value to a `ValueFactory` for result value creation.

Since:
  6.0

### Method Summary

All Methods Instance Methods Abstract Methods
`<T> T` `decodeBit(byte[] bytes, int offset, int length, ValueFactory<T> vf)`
`<T> T` `decodeByteArray(byte[] bytes, int offset, int length, Field f, ValueFactory<T> vf)`
`<T> T` `decodeDate(byte[] bytes, int offset, int length, ValueFactory<T> vf)`
`<T> T` `decodeDatetime(byte[] bytes, int offset, int length, int scale, ValueFactory<T> vf)`
`<T> T` `decodeDecimal(byte[] bytes, int offset, int length, ValueFactory<T> vf)`
`<T> T` `decodeDouble(byte[] bytes, int offset, int length, ValueFactory<T> vf)`
`<T> T` `decodeFloat(byte[] bytes, int offset, int length, ValueFactory<T> vf)`
`<T> T` `decodeInt1(byte[] bytes, int offset, int length, ValueFactory<T> vf)`
`<T> T` `decodeInt2(byte[] bytes, int offset, int length, ValueFactory<T> vf)`
`<T> T` `decodeInt4(byte[] bytes, int offset, int length, ValueFactory<T> vf)`
`<T> T` `decodeInt8(byte[] bytes, int offset, int length, ValueFactory<T> vf)`
`<T> T` `decodeSet(byte[] bytes, int offset, int length, Field f, ValueFactory<T> vf)`
`<T> T` `decodeTime(byte[] bytes, int offset, int length, int scale, ValueFactory<T> vf)`
`<T> T` `decodeTimestamp(byte[] bytes, int offset, int length, int scale, ValueFactory<T> vf)`
`<T> T` `decodeUInt1(byte[] bytes, int offset, int length, ValueFactory<T> vf)`
`<T> T` `decodeUInt2(byte[] bytes, int offset, int length, ValueFactory<T> vf)`
`<T> T` `decodeUInt4(byte[] bytes, int offset, int length, ValueFactory<T> vf)`
`<T> T` `decodeUInt8(byte[] bytes, int offset, int length, ValueFactory<T> vf)`
`<T> T` `decodeYear(byte[] bytes, int offset, int length, ValueFactory<T> vf)`

### Method Detail

#### decodeDate

    <T> T decodeDate(byte[] bytes,
                     int offset,
                     int length,
                     ValueFactory<T> vf)

#### decodeTime

    <T> T decodeTime(byte[] bytes,
                     int offset,
                     int length,
                     int scale,
                     ValueFactory<T> vf)

#### decodeTimestamp

    <T> T decodeTimestamp(byte[] bytes,
                          int offset,
                          int length,
                          int scale,
                          ValueFactory<T> vf)

#### decodeDatetime

    <T> T decodeDatetime(byte[] bytes,
                         int offset,
                         int length,
                         int scale,
                         ValueFactory<T> vf)

#### decodeInt1

    <T> T decodeInt1(byte[] bytes,
                     int offset,
                     int length,
                     ValueFactory<T> vf)

#### decodeUInt1

    <T> T decodeUInt1(byte[] bytes,
                      int offset,
                      int length,
                      ValueFactory<T> vf)

#### decodeInt2

    <T> T decodeInt2(byte[] bytes,
                     int offset,
                     int length,
                     ValueFactory<T> vf)

#### decodeUInt2

    <T> T decodeUInt2(byte[] bytes,
                      int offset,
                      int length,
                      ValueFactory<T> vf)

#### decodeInt4

    <T> T decodeInt4(byte[] bytes,
                     int offset,
                     int length,
                     ValueFactory<T> vf)

#### decodeUInt4

    <T> T decodeUInt4(byte[] bytes,
                      int offset,
                      int length,
                      ValueFactory<T> vf)

#### decodeInt8

    <T> T decodeInt8(byte[] bytes,
                     int offset,
                     int length,
                     ValueFactory<T> vf)

#### decodeUInt8

    <T> T decodeUInt8(byte[] bytes,
                      int offset,
                      int length,
                      ValueFactory<T> vf)

#### decodeFloat

    <T> T decodeFloat(byte[] bytes,
                      int offset,
                      int length,
                      ValueFactory<T> vf)

#### decodeDouble

    <T> T decodeDouble(byte[] bytes,
                       int offset,
                       int length,
                       ValueFactory<T> vf)

#### decodeDecimal

    <T> T decodeDecimal(byte[] bytes,
                        int offset,
                        int length,
                        ValueFactory<T> vf)

#### decodeByteArray

    <T> T decodeByteArray(byte[] bytes,
                          int offset,
                          int length,
                          Field f,
                          ValueFactory<T> vf)

#### decodeBit

    <T> T decodeBit(byte[] bytes,
                    int offset,
                    int length,
                    ValueFactory<T> vf)

#### decodeSet

    <T> T decodeSet(byte[] bytes,
                    int offset,
                    int length,
                    Field f,
                    ValueFactory<T> vf)

#### decodeYear

    <T> T decodeYear(byte[] bytes,
                     int offset,
                     int length,
                     ValueFactory<T> vf)

Copyright © 2016, 2023, Oracle and/or its affiliates.