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,AutoCloseable,PacketOutputStream
public class StandardPacketOutputStream extends AbstractPacketOutputStream
-
-
Field Summary
-
Fields inherited from class org.mariadb.jdbc.internal.io.output.AbstractPacketOutputStream
buf, cmdLength, maxAllowedPacket, maxQuerySizeToLog, permitTrace, pos, seqNo, serverThreadLog, threadId, traceCache
-
Fields inherited from class java.io.FilterOutputStream
out
-
-
Constructor Summary
Constructors Constructor Description StandardPacketOutputStream(OutputStream out, Options options, long threadId)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidflushBuffer(boolean commandEnd)Flush the internal buffer.intgetMaxPacketLength()intinitialPacketPos()voidsetMaxAllowedPacket(int maxAllowedPacket)voidstartPacket(int seqNo)voidwriteEmptyPacket()Write an empty com.-
Methods inherited from class org.mariadb.jdbc.internal.io.output.AbstractPacketOutputStream
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
-
Methods inherited from class java.io.FilterOutputStream
close
-
Methods inherited from class java.io.OutputStream
nullOutputStream
-
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, Options options, long threadId)
-
-
Method Detail
-
getMaxPacketLength
public int getMaxPacketLength()
- Specified by:
getMaxPacketLengthin classAbstractPacketOutputStream
-
startPacket
public void startPacket(int seqNo)
- Specified by:
startPacketin interfacePacketOutputStream- Specified by:
startPacketin classAbstractPacketOutputStream
-
setMaxAllowedPacket
public void setMaxAllowedPacket(int maxAllowedPacket)
- Specified by:
setMaxAllowedPacketin interfacePacketOutputStream- Specified by:
setMaxAllowedPacketin classAbstractPacketOutputStream
-
initialPacketPos
public int initialPacketPos()
-
flushBuffer
protected void flushBuffer(boolean commandEnd) throws IOExceptionFlush the internal buffer.- Specified by:
flushBufferin classAbstractPacketOutputStream- Parameters:
commandEnd- command end- Throws:
IOException- id connection error occur.
-
writeEmptyPacket
public void writeEmptyPacket() throws IOExceptionWrite an empty com.- Specified by:
writeEmptyPacketin interfacePacketOutputStream- Specified by:
writeEmptyPacketin classAbstractPacketOutputStream- Throws:
IOException- if socket error occur.
-
-