org.mariadb.jdbc.internal.stream

## Class MariaDbBufferedInputStream

- java.lang.Object
- - java.io.InputStream
  - - java.io.FilterInputStream
    - - java.io.BufferedInputStream
      - - org.mariadb.jdbc.internal.stream.MariaDbBufferedInputStream

All Implemented Interfaces:
  Closeable, AutoCloseable, MariaDbInputStream

    public class MariaDbBufferedInputStream
    extends BufferedInputStream
    implements MariaDbInputStream

### Field Summary

### Fields inherited from class java.io.BufferedInputStream

`buf, count, marklimit, markpos, pos`

### Fields inherited from class java.io.FilterInputStream

`in`

### Constructor Summary

Constructors
Constructor and Description
`MariaDbBufferedInputStream(InputStream in, int size)`

### Method Summary

All Methods Instance Methods Concrete Methods
`int` `getLastPacketSeq()`
`int` `readHeader()` Permit to return mysql packet header length super fast if already in cache.
`void` `setLastPacketSeq(int lastPacketSeq)`

### Methods inherited from class java.io.BufferedInputStream

`available, close, mark, markSupported, read, read, reset, skip`

### Methods inherited from class java.io.FilterInputStream

`read`

### 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.internal.stream.MariaDbInputStream

`available, close, mark, markSupported, read, read, read, reset, skip`

### Constructor Detail

#### MariaDbBufferedInputStream

    public MariaDbBufferedInputStream(InputStream in,
                                      int size)

### Method Detail

#### readHeader

    public int readHeader()
                   throws IOException

Permit to return mysql packet header length super fast if already in cache. (no System.arraycopy)

Specified by:
  `readHeader` in interface `MariaDbInputStream`
Returns:
  headerLength.
Throws:
  `IOException` - id stream throw error

#### getLastPacketSeq

    public int getLastPacketSeq()

Specified by:
  `getLastPacketSeq` in interface `MariaDbInputStream`

#### setLastPacketSeq

    public void setLastPacketSeq(int lastPacketSeq)

Specified by:
  `setLastPacketSeq` in interface `MariaDbInputStream`