Interface PacketOutputStream
-
- All Known Implementing Classes:
AbstractPacketOutputStream,CompressPacketOutputStream,StandardPacketOutputStream
public interface PacketOutputStream
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description booleanbufferIsDataAfterMark()voidcheckMaxAllowedLength(int length)booleancheckRemainingSize(int len)voidclose()booleanexceedMaxLength()voidflush()voidflushBufferStopAtMark()intgetMaxAllowedPacket()OutputStreamgetOutputStream()intinitialPacketPos()booleanisMarked()voidmark()voidpermitTrace(boolean permitTrace)byte[]resetMark()voidsetMaxAllowedPacket(int maxAllowedPacket)voidsetServerThreadId(long serverThreadId, Boolean isMaster)voidsetTraceCache(LruTraceCache traceCache)voidstartPacket(int seqNo)voidwrite(byte[] arr)voidwrite(byte[] arr, int off, int len)voidwrite(int arr)voidwrite(InputStream is, boolean escape, boolean noBackslashEscapes)voidwrite(InputStream is, long length, boolean escape, boolean noBackslashEscapes)voidwrite(Reader reader, boolean escape, boolean noBackslashEscapes)voidwrite(Reader reader, long length, boolean escape, boolean noBackslashEscapes)voidwrite(String str)voidwrite(String str, boolean escape, boolean noBackslashEscapes)voidwriteBytes(byte value, int len)voidwriteBytesEscaped(byte[] bytes, int len, boolean noBackslashEscapes)voidwriteEmptyPacket()voidwriteEmptyPacket(int seqNo)voidwriteFieldLength(long length)voidwriteInt(int value)voidwriteLong(long value)voidwriteShort(short value)
-
-
-
Method Detail
-
startPacket
void startPacket(int seqNo)
-
writeEmptyPacket
void writeEmptyPacket(int seqNo) throws IOException- Throws:
IOException
-
writeEmptyPacket
void writeEmptyPacket() throws IOException- Throws:
IOException
-
write
void write(int arr) throws IOException- Throws:
IOException
-
write
void write(byte[] arr) throws IOException- Throws:
IOException
-
write
void write(byte[] arr, int off, int len) throws IOException- Throws:
IOException
-
write
void write(String str) throws IOException
- Throws:
IOException
-
write
void write(String str, boolean escape, boolean noBackslashEscapes) throws IOException
- Throws:
IOException
-
write
void write(InputStream is, boolean escape, boolean noBackslashEscapes) throws IOException
- Throws:
IOException
-
write
void write(InputStream is, long length, boolean escape, boolean noBackslashEscapes) throws IOException
- Throws:
IOException
-
write
void write(Reader reader, boolean escape, boolean noBackslashEscapes) throws IOException
- Throws:
IOException
-
write
void write(Reader reader, long length, boolean escape, boolean noBackslashEscapes) throws IOException
- Throws:
IOException
-
writeBytesEscaped
void writeBytesEscaped(byte[] bytes, int len, boolean noBackslashEscapes) throws IOException- Throws:
IOException
-
flush
void flush() throws IOException- Throws:
IOException
-
close
void close() throws IOException- Throws:
IOException
-
checkRemainingSize
boolean checkRemainingSize(int len)
-
exceedMaxLength
boolean exceedMaxLength()
-
getOutputStream
OutputStream getOutputStream()
-
writeShort
void writeShort(short value) throws IOException- Throws:
IOException
-
writeInt
void writeInt(int value) throws IOException- Throws:
IOException
-
writeLong
void writeLong(long value) throws IOException- Throws:
IOException
-
writeBytes
void writeBytes(byte value, int len) throws IOException- Throws:
IOException
-
writeFieldLength
void writeFieldLength(long length) throws IOException- Throws:
IOException
-
getMaxAllowedPacket
int getMaxAllowedPacket()
-
setMaxAllowedPacket
void setMaxAllowedPacket(int maxAllowedPacket)
-
permitTrace
void permitTrace(boolean permitTrace)
-
setServerThreadId
void setServerThreadId(long serverThreadId, Boolean isMaster)
-
setTraceCache
void setTraceCache(LruTraceCache traceCache)
-
mark
void mark() throws MaxAllowedPacketException
- Throws:
MaxAllowedPacketException
-
isMarked
boolean isMarked()
-
flushBufferStopAtMark
void flushBufferStopAtMark() throws IOException- Throws:
IOException
-
bufferIsDataAfterMark
boolean bufferIsDataAfterMark()
-
resetMark
byte[] resetMark()
-
initialPacketPos
int initialPacketPos()
-
checkMaxAllowedLength
void checkMaxAllowedLength(int length) throws MaxAllowedPacketException- Throws:
MaxAllowedPacketException
-
-