org.mariadb.jdbc.internal.common.packet.buffer

## Class Reader

- java.lang.Object
- - org.mariadb.jdbc.internal.common.packet.buffer.Reader

    public class Reader
    extends Object

### Constructor Summary

Constructors
Constructor and Description
`Reader(RawPacket rawPacket)`

### Method Summary

All Methods Instance Methods Concrete Methods
`void` `appendPacket(RawPacket rawPacket)`
`byte` `getByteAt(int i)`
`long` `getLengthEncodedBinary()`
`byte[]` `getLengthEncodedBytes()`
`byte[]` `getLengthEncodedBytesWithLength(long length)`
`String` `getLengthEncodedString()`
`byte` `getPacketSeq()`
`int` `getRemainingSize()`
`long` `getSilentLengthEncodedBinary()`
`int` `read24bitword()`
`byte` `readByte()` reads a byte from the buffer
`int` `readInt()` read a int (4 bytes) from the buffer;
`long` `readLong()` read a long (8 bytes) from the buffer;
`byte[]` `readRawBytes(int numberOfBytes)`
`short` `readShort()` read a short (2 bytes) from the buffer;
`String` `readString(String charset)` Reads a string from the buffer, looks for a 0 to end the string
`void` `skipByte()`
`long` `skipBytes(int bytesToSkip)`
`Reader` `skipLengthEncodedBytes()`

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

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

### Constructor Detail

#### Reader

    public Reader(RawPacket rawPacket)

### Method Detail

#### readString

    public String readString(String charset)

Reads a string from the buffer, looks for a 0 to end the string

Parameters:
  `charset` - the charset to use, for example ASCII
Returns:
  the read string

#### readShort

    public short readShort()

read a short (2 bytes) from the buffer;

Returns:
  an short

#### readInt

    public int readInt()

read a int (4 bytes) from the buffer;

Returns:
  a int

#### readLong

    public long readLong()

read a long (8 bytes) from the buffer;

Returns:
  a long

#### readByte

    public byte readByte()

reads a byte from the buffer

Returns:
  the byte

#### readRawBytes

    public byte[] readRawBytes(int numberOfBytes)

#### skipByte

    public void skipByte()
                  throws IOException

Throws:
  `IOException`

#### skipBytes

    public long skipBytes(int bytesToSkip)

#### skipLengthEncodedBytes

    public Reader skipLengthEncodedBytes()

#### read24bitword

    public int read24bitword()

#### getLengthEncodedBinary

    public long getLengthEncodedBinary()

#### getLengthEncodedString

    public String getLengthEncodedString()

#### getLengthEncodedBytes

    public byte[] getLengthEncodedBytes()
                                 throws IOException

Throws:
  `IOException`

#### getLengthEncodedBytesWithLength

    public byte[] getLengthEncodedBytesWithLength(long length)

#### getByteAt

    public byte getByteAt(int i)
                   throws IOException

Throws:
  `IOException`

#### getPacketSeq

    public byte getPacketSeq()

#### getRemainingSize

    public int getRemainingSize()

#### appendPacket

    public void appendPacket(RawPacket rawPacket)

#### getSilentLengthEncodedBinary

    public long getSilentLengthEncodedBinary()