## org.mariadb.jdbc.internal.io.output
Class StandardPacketOutputStream

    java.lang.Object
      java.io.OutputStream
          java.io.FilterOutputStream
              org.mariadb.jdbc.internal.io.output.AbstractPacketOutputStream
                  org.mariadb.jdbc.internal.io.output.StandardPacketOutputStream

All Implemented Interfaces:
  Closeable, Flushable, PacketOutputStream

    public class StandardPacketOutputStream

extends AbstractPacketOutputStream

Field Summary

Fields inherited from class org.mariadb.jdbc.internal.io.output.AbstractPacketOutputStream
`buf, cmdLength, logger, maxAllowedPacket, maxQuerySizeToLog, permitTrace, pos, seqNo, serverThreadLog, traceCache`

Fields inherited from class java.io.FilterOutputStream
`out`

Constructor Summary
`StandardPacketOutputStream(OutputStream out, int maxQuerySizeToLog)`

Method Summary
`protected void` `flushBuffer(boolean commandEnd)` Flush the internal buffer.
`int` `getMaxPacketLength()`
`void` `setMaxAllowedPacket(int maxAllowedPacket)`
`void` `startPacket(int seqNo)`
`void` `writeEmptyPacket()` Write an empty com.

Methods inherited from class org.mariadb.jdbc.internal.io.output.AbstractPacketOutputStream
`checkMaxAllowedLength, checkRemainingSize, flush, getMaxAllowedPacket, getOutputStream, isAllowedCmdLength, permitTrace, setServerThreadId, setTraceCache, write, write, write, write, write, write, write, write, write, writeBytes, writeBytesEscaped, writeEmptyPacket, writeFieldLength, writeInt, writeLong, writeShort`

Methods inherited from class java.io.FilterOutputStream
`close`

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.io.output.PacketOutputStream
`close`

Constructor Detail

### StandardPacketOutputStream

    public StandardPacketOutputStream(OutputStream out,
                                      int maxQuerySizeToLog)

Method Detail

### getMaxPacketLength

    public int getMaxPacketLength()

  Specified by:
    `getMaxPacketLength` in class `AbstractPacketOutputStream`

### startPacket

    public void startPacket(int seqNo)

  Specified by:
    `startPacket` in interface `PacketOutputStream`
  Specified by:
    `startPacket` in class `AbstractPacketOutputStream`

### setMaxAllowedPacket

    public void setMaxAllowedPacket(int maxAllowedPacket)

  Specified by:
    `setMaxAllowedPacket` in interface `PacketOutputStream`
  Specified by:
    `setMaxAllowedPacket` in class `AbstractPacketOutputStream`

### flushBuffer

    protected void flushBuffer(boolean commandEnd)
                        throws IOException

  Flush the internal buffer.

  Specified by:
    `flushBuffer` in class `AbstractPacketOutputStream`
  Parameters:
    `commandEnd` - command end
  Throws:
    `IOException` - id connection error occur.

### writeEmptyPacket

    public void writeEmptyPacket()
                          throws IOException

  Write an empty com.

  Specified by:
    `writeEmptyPacket` in interface `PacketOutputStream`
  Specified by:
    `writeEmptyPacket` in class `AbstractPacketOutputStream`
  Throws:
    `IOException` - if socket error occur.

Copyright © 2017. All rights reserved.