public class StandardPacketOutputStream extends AbstractPacketOutputStream
Modifier and Type | Field and Description |
---|---|
private static Logger |
logger |
private static int |
MAX_PACKET_LENGTH |
private int |
maxPacketLength |
buf, cmdLength, maxAllowedPacket, maxQuerySizeToLog, permitTrace, pos, seqNo, serverThreadLog, traceCache
Constructor and Description |
---|
StandardPacketOutputStream(java.io.OutputStream out,
Options options) |
Modifier and Type | Method and Description |
---|---|
protected void |
flushBuffer(boolean commandEnd)
Flush the internal buffer.
|
int |
getMaxPacketLength() |
int |
initialPacketPos() |
void |
setMaxAllowedPacket(int maxAllowedPacket) |
void |
startPacket(int seqNo) |
void |
writeEmptyPacket()
Write an empty com.
|
bufferIsDataAfterMark, checkMaxAllowedLength, checkRemainingSize, exceedMaxLength, flush, flushBufferStopAtMark, getMaxAllowedPacket, getOutputStream, isMarked, mark, permitTrace, resetMark, setServerThreadId, setTraceCache, write, write, write, write, write, write, write, write, write, writeBytes, writeBytesEscaped, writeEmptyPacket, writeFieldLength, writeInt, writeLong, writeShort
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
close
private static final Logger logger
private static final int MAX_PACKET_LENGTH
private int maxPacketLength
public StandardPacketOutputStream(java.io.OutputStream out, Options options)
public int getMaxPacketLength()
getMaxPacketLength
in class AbstractPacketOutputStream
public void startPacket(int seqNo)
startPacket
in interface PacketOutputStream
startPacket
in class AbstractPacketOutputStream
public void setMaxAllowedPacket(int maxAllowedPacket)
setMaxAllowedPacket
in interface PacketOutputStream
setMaxAllowedPacket
in class AbstractPacketOutputStream
public int initialPacketPos()
protected void flushBuffer(boolean commandEnd) throws java.io.IOException
flushBuffer
in class AbstractPacketOutputStream
commandEnd
- command endjava.io.IOException
- id connection error occur.public void writeEmptyPacket() throws java.io.IOException
writeEmptyPacket
in interface PacketOutputStream
writeEmptyPacket
in class AbstractPacketOutputStream
java.io.IOException
- if socket error occur.