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
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final Logger
private static final int
private int
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
ConstructorsConstructorDescriptionStandardPacketOutputStream
(OutputStream out, Options options, long threadId) -
Method Summary
Modifier and TypeMethodDescriptionprotected void
flushBuffer
(boolean commandEnd) Flush the internal buffer.int
int
void
setMaxAllowedPacket
(int maxAllowedPacket) void
startPacket
(int seqNo) void
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
-
Field Details
-
logger
-
MAX_PACKET_LENGTH
private static final int MAX_PACKET_LENGTH- See Also:
-
maxPacketLength
private int maxPacketLength
-
-
Constructor Details
-
StandardPacketOutputStream
-
-
Method Details
-
getMaxPacketLength
public int getMaxPacketLength()- Specified by:
getMaxPacketLength
in classAbstractPacketOutputStream
-
startPacket
public void startPacket(int seqNo) - Specified by:
startPacket
in interfacePacketOutputStream
- Specified by:
startPacket
in classAbstractPacketOutputStream
-
setMaxAllowedPacket
public void setMaxAllowedPacket(int maxAllowedPacket) - Specified by:
setMaxAllowedPacket
in interfacePacketOutputStream
- Specified by:
setMaxAllowedPacket
in classAbstractPacketOutputStream
-
initialPacketPos
public int initialPacketPos() -
flushBuffer
Flush the internal buffer.- Specified by:
flushBuffer
in classAbstractPacketOutputStream
- Parameters:
commandEnd
- command end- Throws:
IOException
- id connection error occur.
-
writeEmptyPacket
Write an empty com.- Specified by:
writeEmptyPacket
in interfacePacketOutputStream
- Specified by:
writeEmptyPacket
in classAbstractPacketOutputStream
- Throws:
IOException
- if socket error occur.
-