InputStream decorator that decompresses brotli data.
Not thread-safe.
| Modifier and Type | Field and Description |
|---|---|
| private byte[] | buffer
Internal buffer used for efficient byte-by-byte reading. |
| private int | bufferOffset
Next unused byte offset. |
| public static final int | |
| private int | remainingBufferBytes
Number of decoded but still unused bytes in internal buffer. |
| private final State | state
Decoder state. |
| Access | Constructor and Description |
|---|---|
| public | BrotliInputStream(InputStream
underlying data source source)Creates a |
| public | BrotliInputStream(InputStream
compressed data source source, int size of internal buffer used in case of
byte-by-byte reading byteReadBufferSize)Creates a |
| public | BrotliInputStream(InputStream
compressed data source source, int size of internal buffer used in case of
byte-by-byte reading byteReadBufferSize, byte[] custom dictionary data; customDictionary)null if not usedCreates a |
| Modifier and Type | Method and Description |
|---|---|
| public void | close()
Overrides java. Implements java. |
| public int | read()
Implements abstract java. |
| public int | read(byte[]
the buffer into which the data is read. destBuffer, int the start offset in array destOffset, int b
at which the data is written.the maximum number of bytes to read. destLen)Overrides java. len bytes of data from the input stream into
an array of bytes.
|
| buffer | back to summary |
|---|---|
| private byte[] buffer Internal buffer used for efficient byte-by-byte reading. | |
| bufferOffset | back to summary |
|---|---|
| private int bufferOffset Next unused byte offset. | |
| DEFAULT_INTERNAL_BUFFER_SIZE | back to summary |
|---|---|
| public static final int DEFAULT_INTERNAL_BUFFER_SIZE | |
| remainingBufferBytes | back to summary |
|---|---|
| private int remainingBufferBytes Number of decoded but still unused bytes in internal buffer. | |
| state | back to summary |
|---|---|
| private final State state Decoder state. | |
| BrotliInputStream | back to summary |
|---|---|
| public BrotliInputStream(InputStream source) throws IOException Creates a For byte-by-byte reading ( Will block the thread until first kilobyte of data of source is available.
| |
| BrotliInputStream | back to summary |
|---|---|
| public BrotliInputStream(InputStream source, int byteReadBufferSize) throws IOException Creates a For byte-by-byte reading ( Will block the thread until first kilobyte of data of source is available.
| |
| BrotliInputStream | back to summary |
|---|---|
| public BrotliInputStream(InputStream source, int byteReadBufferSize, byte[] customDictionary) throws IOException Creates a For byte-by-byte reading ( Will block the thread until first kilobyte of data of source is available.
| |
| close | back to summary |
|---|---|
| public void close() throws IOException Overrides java. Implements java. Doc from java. Closes this input stream and releases any system resources associated with the stream.
| |
| read | back to summary |
|---|---|
| public int read() throws IOException Implements abstract java. Doc from java. Reads the next byte of data from the input stream. The value byte is
returned as an
| |
| read | back to summary |
|---|---|
| public int read(byte[] destBuffer, int destOffset, int destLen) throws IOException Overrides java. Doc from java. Reads up to This method blocks until input data is available, end of file is detected, or an exception is thrown. If The first byte read is stored into element In every case, elements
| |