类 CompressionSplittedInputStream
- java.lang.Object
-
- java.io.InputStream
-
- java.io.FilterInputStream
-
- com.mysql.cj.protocol.x.CompressionSplittedInputStream
-
- 所有已实现的接口:
Closeable,AutoCloseable
public class CompressionSplittedInputStream extends FilterInputStream
AnInputStreamwrapper that analyzes X Protocol frames and, if compressed, routes them to a secondary compressor-ableInputStreamthat also knows how to rebuild uncompressed X Protocol frames from compressed ones.
-
-
字段概要
-
从类继承的字段 java.io.FilterInputStream
in
-
-
构造器概要
构造器 构造器 说明 CompressionSplittedInputStream(InputStream in, CompressorStreamsFactory streamsFactory)
-
方法概要
所有方法 实例方法 具体方法 修饰符和类型 方法 说明 intavailable()Same asInputStream.available(), except that the exact number of bytes that can be read from the underlyingInputStreammay not be accurate until it is known if the next bytes contain compressed data or not.voidclose()Closes this stream.intread()Forwards the read toread(byte[], int, int).intread(byte[] b)Forwards the read toread(byte[], int, int).intread(byte[] b, int off, int len)Reads bytes from the underlyingInputStreameither from the one that gets data directly from the original sourceInputStreamor from a compressor ableInputStream, if reading of a compressed X Protocol frame is in progress.intreadFully(byte[] b)Reads the number of bytes required to fill the given buffer from the underlyingInputStream, blocking if needed.-
从类继承的方法 java.io.FilterInputStream
mark, markSupported, reset, skip
-
从类继承的方法 java.io.InputStream
nullInputStream, readAllBytes, readNBytes, readNBytes, transferTo
-
-
-
-
构造器详细资料
-
CompressionSplittedInputStream
public CompressionSplittedInputStream(InputStream in, CompressorStreamsFactory streamsFactory)
-
-
方法详细资料
-
available
public int available() throws IOExceptionSame asInputStream.available(), except that the exact number of bytes that can be read from the underlyingInputStreammay not be accurate until it is known if the next bytes contain compressed data or not.- 覆盖:
available在类中FilterInputStream- 返回:
- an approximate number of available bytes to read.
- 抛出:
IOException- 另请参阅:
FilterInputStream.available()
-
close
public void close() throws IOExceptionCloses this stream.- 指定者:
close在接口中AutoCloseable- 指定者:
close在接口中Closeable- 覆盖:
close在类中FilterInputStream- 抛出:
IOException- 另请参阅:
FilterInputStream.close()
-
read
public int read() throws IOExceptionForwards the read toread(byte[], int, int).- 覆盖:
read在类中FilterInputStream- 抛出:
IOException- 另请参阅:
FilterInputStream.read()
-
read
public int read(byte[] b) throws IOExceptionForwards the read toread(byte[], int, int).- 覆盖:
read在类中FilterInputStream- 抛出:
IOException- 另请参阅:
FilterInputStream.read(byte[])
-
read
public int read(byte[] b, int off, int len) throws IOExceptionReads bytes from the underlyingInputStreameither from the one that gets data directly from the original sourceInputStreamor from a compressor ableInputStream, if reading of a compressed X Protocol frame is in progress.- 覆盖:
read在类中FilterInputStream- 抛出:
IOException- 另请参阅:
FilterInputStream.read(byte[], int, int)
-
readFully
public int readFully(byte[] b) throws IOExceptionReads the number of bytes required to fill the given buffer from the underlyingInputStream, blocking if needed.- 参数:
b- the buffer into which the data is read.- 返回:
- the total number of bytes read into the buffer, or
-1if there is no more data because the end of the stream has been reached. - 抛出:
IOException- if any of the underlying I/O operations fail.
-
-