org.mariadb.jdbc.internal.com.read.resultset.rowprotocol

## Class BinaryRowProtocol

- java.lang.Object
- - org.mariadb.jdbc.internal.com.read.resultset.rowprotocol.RowProtocol
  - - org.mariadb.jdbc.internal.com.read.resultset.rowprotocol.BinaryRowProtocol

    public class BinaryRowProtocol
    extends RowProtocol

### Field Summary

### Fields inherited from class org.mariadb.jdbc.internal.com.read.resultset.rowprotocol.RowProtocol

`BIT_LAST_FIELD_NOT_NULL, BIT_LAST_FIELD_NULL, BIT_LAST_ZERO_DATE, buf, index, isIntegerRegex, lastValueNull, length, maxFieldSize, NULL_LENGTH, options, pos, TINYINT1_IS_BIT, YEAR_IS_DATE_TYPE`

### Constructor Summary

Constructors
Constructor and Description
`BinaryRowProtocol(ColumnInformation[] columnInformation, int columnInformationLength, int maxFieldSize, Options options)` Constructor.

### Method Summary

All Methods Instance Methods Concrete Methods
`BigDecimal` `getInternalBigDecimal(ColumnInformation columnInfo)` Get BigDecimal from raw binary format.
`BigInteger` `getInternalBigInteger(ColumnInformation columnInfo)` Get BigInteger from raw binary format.
`boolean` `getInternalBoolean(ColumnInformation columnInfo)` Get boolean from raw binary format.
`byte` `getInternalByte(ColumnInformation columnInfo)` Get byte from raw binary format.
`Date` `getInternalDate(ColumnInformation columnInfo, Calendar cal, TimeZone timeZone)` Get date from raw binary format.
`double` `getInternalDouble(ColumnInformation columnInfo)` Get double from raw binary format.
`float` `getInternalFloat(ColumnInformation columnInfo)` Get float from raw binary format.
`int` `getInternalInt(ColumnInformation columnInfo)` Get int from raw binary format.
`long` `getInternalLong(ColumnInformation columnInfo)` Get long from raw binary format.
`Object` `getInternalObject(ColumnInformation columnInfo, TimeZone timeZone)` Get Object from raw binary format.
`short` `getInternalShort(ColumnInformation columnInfo)` Get short from raw binary format.
`String` `getInternalString(ColumnInformation columnInfo, Calendar cal, TimeZone timeZone)` Get string from raw binary format.
`Time` `getInternalTime(ColumnInformation columnInfo, Calendar cal, TimeZone timeZone)` Get time from raw binary format.
`Timestamp` `getInternalTimestamp(ColumnInformation columnInfo, Calendar userCalendar, TimeZone timeZone)` Get timestamp from raw binary format.
`String` `getInternalTimeString(ColumnInformation columnInfo)` Get Time in string format from raw binary format.
`boolean` `isBinaryEncoded()` Indicate if data is binary encoded.
`void` `setPosition(int newIndex)` Set length and pos indicator to asked index.

### Methods inherited from class org.mariadb.jdbc.internal.com.read.resultset.rowprotocol.RowProtocol

`extractNanos, getInternalMediumInt, getInternalSmallInt, getInternalTinyInt, getLengthMaxFieldSize, getMaxFieldSize, lastValueWasNull, parseBit, rangeCheck, rangeCheck, resetRow, wasNull, zeroFillingIfNeeded`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Constructor Detail

#### BinaryRowProtocol

    public BinaryRowProtocol(ColumnInformation[] columnInformation,
                             int columnInformationLength,
                             int maxFieldSize,
                             Options options)

Constructor.

Parameters:
  `columnInformation` - column information.
  `columnInformationLength` - number of columns
  `maxFieldSize` - max field size
  `options` - connection options

### Method Detail

#### setPosition

    public void setPosition(int newIndex)

Set length and pos indicator to asked index.

Specified by:
  `setPosition` in class `RowProtocol`
Parameters:
  `newIndex` - index (0 is first).
See Also:
  Resultset row protocol documentation

#### getInternalString

    public String getInternalString(ColumnInformation columnInfo,
                                    Calendar cal,
                                    TimeZone timeZone)
                             throws SQLException

Get string from raw binary format.

Specified by:
  `getInternalString` in class `RowProtocol`
Parameters:
  `columnInfo` - column information
  `cal` - calendar
  `timeZone` - time zone
Returns:
  String value of raw bytes
Throws:
  `SQLException` - if conversion failed

#### getInternalInt

    public int getInternalInt(ColumnInformation columnInfo)
                       throws SQLException

Get int from raw binary format.

Specified by:
  `getInternalInt` in class `RowProtocol`
Parameters:
  `columnInfo` - column information
Returns:
  int value
Throws:
  `SQLException` - if column is not numeric or is not in Integer bounds.

#### getInternalLong

    public long getInternalLong(ColumnInformation columnInfo)
                         throws SQLException

Get long from raw binary format.

Specified by:
  `getInternalLong` in class `RowProtocol`
Parameters:
  `columnInfo` - column information
Returns:
  long value
Throws:
  `SQLException` - if column is not numeric or is not in Long bounds (for big unsigned values)

#### getInternalFloat

    public float getInternalFloat(ColumnInformation columnInfo)
                           throws SQLException

Get float from raw binary format.

Specified by:
  `getInternalFloat` in class `RowProtocol`
Parameters:
  `columnInfo` - column information
Returns:
  float value
Throws:
  `SQLException` - if column is not numeric or is not in Float bounds.

#### getInternalDouble

    public double getInternalDouble(ColumnInformation columnInfo)
                             throws SQLException

Get double from raw binary format.

Specified by:
  `getInternalDouble` in class `RowProtocol`
Parameters:
  `columnInfo` - column information
Returns:
  double value
Throws:
  `SQLException` - if column is not numeric or is not in Double bounds (unsigned columns).

#### getInternalBigDecimal

    public BigDecimal getInternalBigDecimal(ColumnInformation columnInfo)
                                     throws SQLException

Get BigDecimal from raw binary format.

Specified by:
  `getInternalBigDecimal` in class `RowProtocol`
Parameters:
  `columnInfo` - column information
Returns:
  BigDecimal value
Throws:
  `SQLException` - if column is not numeric

#### getInternalDate

    public Date getInternalDate(ColumnInformation columnInfo,
                                Calendar cal,
                                TimeZone timeZone)
                         throws SQLException

Get date from raw binary format.

Specified by:
  `getInternalDate` in class `RowProtocol`
Parameters:
  `columnInfo` - column information
  `cal` - calendar
  `timeZone` - time zone
Returns:
  date value
Throws:
  `SQLException` - if column is not compatible to Date

#### getInternalTime

    public Time getInternalTime(ColumnInformation columnInfo,
                                Calendar cal,
                                TimeZone timeZone)
                         throws SQLException

Get time from raw binary format.

Specified by:
  `getInternalTime` in class `RowProtocol`
Parameters:
  `columnInfo` - column information
  `cal` - calendar
  `timeZone` - time zone
Returns:
  Time value
Throws:
  `SQLException` - if column cannot be converted to Time

#### getInternalTimestamp

    public Timestamp getInternalTimestamp(ColumnInformation columnInfo,
                                          Calendar userCalendar,
                                          TimeZone timeZone)
                                   throws SQLException

Get timestamp from raw binary format.

Specified by:
  `getInternalTimestamp` in class `RowProtocol`
Parameters:
  `columnInfo` - column information
  `userCalendar` - user calendar
  `timeZone` - time zone
Returns:
  timestamp value
Throws:
  `SQLException` - if column type is not compatible

#### getInternalObject

    public Object getInternalObject(ColumnInformation columnInfo,
                                    TimeZone timeZone)
                             throws SQLException

Get Object from raw binary format.

Specified by:
  `getInternalObject` in class `RowProtocol`
Parameters:
  `columnInfo` - column information
  `timeZone` - time zone
Returns:
  Object value
Throws:
  `SQLException` - if column type is not compatible

#### getInternalBoolean

    public boolean getInternalBoolean(ColumnInformation columnInfo)
                               throws SQLException

Get boolean from raw binary format.

Specified by:
  `getInternalBoolean` in class `RowProtocol`
Parameters:
  `columnInfo` - column information
Returns:
  boolean value
Throws:
  `SQLException` - if column type doesn't permit conversion

#### getInternalByte

    public byte getInternalByte(ColumnInformation columnInfo)
                         throws SQLException

Get byte from raw binary format.

Specified by:
  `getInternalByte` in class `RowProtocol`
Parameters:
  `columnInfo` - column information
Returns:
  byte value
Throws:
  `SQLException` - if column type doesn't permit conversion

#### getInternalShort

    public short getInternalShort(ColumnInformation columnInfo)
                           throws SQLException

Get short from raw binary format.

Specified by:
  `getInternalShort` in class `RowProtocol`
Parameters:
  `columnInfo` - column information
Returns:
  short value
Throws:
  `SQLException` - if column type doesn't permit conversion

#### getInternalTimeString

    public String getInternalTimeString(ColumnInformation columnInfo)

Get Time in string format from raw binary format.

Specified by:
  `getInternalTimeString` in class `RowProtocol`
Parameters:
  `columnInfo` - column information
Returns:
  time value

#### getInternalBigInteger

    public BigInteger getInternalBigInteger(ColumnInformation columnInfo)
                                     throws SQLException

Get BigInteger from raw binary format.

Specified by:
  `getInternalBigInteger` in class `RowProtocol`
Parameters:
  `columnInfo` - column information
Returns:
  BigInteger value
Throws:
  `SQLException` - if column type doesn't permit conversion or value is not in BigInteger range

#### isBinaryEncoded

    public boolean isBinaryEncoded()

Indicate if data is binary encoded.

Specified by:
  `isBinaryEncoded` in class `RowProtocol`
Returns:
  always true.