public class BrotliInputStream extends InputStream
InputStream
decorator that decompresses brotli data.
Not thread-safe.
Modifier and Type | Field and Description |
---|---|
static int |
DEFAULT_INTERNAL_BUFFER_SIZE |
Constructor and Description |
---|
BrotliInputStream(InputStream source)
Creates a
InputStream wrapper that decompresses brotli data. |
BrotliInputStream(InputStream source,
int byteReadBufferSize)
Creates a
InputStream wrapper that decompresses brotli data. |
Modifier and Type | Method and Description |
---|---|
void |
attachDictionaryChunk(byte[] data) |
void |
close() |
void |
enableEagerOutput() |
void |
enableLargeWindow() |
int |
read() |
int |
read(byte[] destBuffer,
int destOffset,
int destLen) |
available, mark, markSupported, read, reset, skip
public static final int DEFAULT_INTERNAL_BUFFER_SIZE
public BrotliInputStream(InputStream source) throws IOException
InputStream
wrapper that decompresses brotli data.
For byte-by-byte reading (read()
) internal buffer with
DEFAULT_INTERNAL_BUFFER_SIZE
size is allocated and used.
Will block the thread until first BitReader.CAPACITY
bytes of data of source
are available.
source
- underlying data sourceIOException
- in case of corrupted data or source stream problemspublic BrotliInputStream(InputStream source, int byteReadBufferSize) throws IOException
InputStream
wrapper that decompresses brotli data.
For byte-by-byte reading (read()
) internal buffer of specified size is
allocated and used.
Will block the thread until first BitReader.CAPACITY
bytes of data of source
are available.
source
- compressed data sourcebyteReadBufferSize
- size of internal buffer used in case of
byte-by-byte readingIOException
- in case of corrupted data or source stream problemspublic void attachDictionaryChunk(byte[] data)
public void enableEagerOutput()
public void enableLargeWindow()
public void close() throws IOException
close
in interface Closeable
close
in interface AutoCloseable
close
in class InputStream
IOException
public int read() throws IOException
read
in class InputStream
IOException
public int read(byte[] destBuffer, int destOffset, int destLen) throws IOException
read
in class InputStream
IOException
Copyright © 2002–2025 Gargoyle Software Inc.. All rights reserved.