org.mariadb.jdbc.internal.common.packet

## Class PacketOutputStream

- java.lang.Object
- - java.io.OutputStream
  - - org.mariadb.jdbc.internal.common.packet.PacketOutputStream

All Implemented Interfaces:
  Closeable, Flushable, AutoCloseable

    public class PacketOutputStream
    extends OutputStream

### Constructor Summary

Constructors
Constructor and Description
`PacketOutputStream(OutputStream baseStream)`

### Method Summary

Methods
`void` `close()`
`void` `finishPacket()`
`void` `flush()`
`int` `getSeqNo()`
`void` `sendFile(InputStream is, int seq)`
`void` `setCompress(boolean value)`
`void` `startPacket(int seqNo)`
`void` `write(byte[] bytes)`
`void` `write(byte[] bytes, int off, int len)`
`void` `write(int b)`

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

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

### Constructor Detail

#### PacketOutputStream

    public PacketOutputStream(OutputStream baseStream)

### Method Detail

#### setCompress

    public void setCompress(boolean value)

#### startPacket

    public void startPacket(int seqNo)
                     throws IOException

Throws:
  `IOException`

#### getSeqNo

    public int getSeqNo()

#### sendFile

    public void sendFile(InputStream is,
                int seq)
                  throws IOException

Throws:
  `IOException`

#### finishPacket

    public void finishPacket()
                      throws IOException

Throws:
  `IOException`

#### write

    public void write(byte[] bytes,
             int off,
             int len)
               throws IOException

Overrides:
  `write` in class `OutputStream`
Throws:
  `IOException`

#### flush

    public void flush()
               throws IOException

Specified by:
  `flush` in interface `Flushable`
Overrides:
  `flush` in class `OutputStream`
Throws:
  `IOException`

#### write

    public void write(byte[] bytes)
               throws IOException

Overrides:
  `write` in class `OutputStream`
Throws:
  `IOException`

#### write

    public void write(int b)
               throws IOException

Specified by:
  `write` in class `OutputStream`
Throws:
  `IOException`

#### close

    public void close()
               throws IOException

Specified by:
  `close` in interface `Closeable`
Specified by:
  `close` in interface `AutoCloseable`
Overrides:
  `close` in class `OutputStream`
Throws:
  `IOException`