Class BrotliInputStream
java.lang.Object
java.io.InputStream
org.brotli.dec.BrotliInputStream
- All Implemented Interfaces:
Closeable, AutoCloseable
InputStream decorator that decompresses brotli data.
Not thread-safe.
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionBrotliInputStream(InputStream source) Creates aInputStreamwrapper that decompresses brotli data.BrotliInputStream(InputStream source, int byteReadBufferSize) Creates aInputStreamwrapper that decompresses brotli data. -
Method Summary
Modifier and TypeMethodDescriptionvoidattachDictionaryChunk(byte[] data) voidclose()voidvoidintread()intread(byte[] destBuffer, int destOffset, int destLen) Methods inherited from class InputStream
available, mark, markSupported, read, reset, skip
-
Field Details
-
DEFAULT_INTERNAL_BUFFER_SIZE
public static final int DEFAULT_INTERNAL_BUFFER_SIZE- See Also:
-
-
Constructor Details
-
BrotliInputStream
Creates aInputStreamwrapper that decompresses brotli data.For byte-by-byte reading (
read()) internal buffer withDEFAULT_INTERNAL_BUFFER_SIZEsize is allocated and used.Will block the thread until first
BitReader.CAPACITYbytes of data of source are available.- Parameters:
source- underlying data source- Throws:
IOException- in case of corrupted data or source stream problems
-
BrotliInputStream
Creates aInputStreamwrapper 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.CAPACITYbytes of data of source are available.- Parameters:
source- compressed data sourcebyteReadBufferSize- size of internal buffer used in case of byte-by-byte reading- Throws:
IOException- in case of corrupted data or source stream problems
-
-
Method Details
-
attachDictionaryChunk
public void attachDictionaryChunk(byte[] data) -
enableEagerOutput
public void enableEagerOutput() -
enableLargeWindow
public void enableLargeWindow() -
close
- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Overrides:
closein classInputStream- Throws:
IOException
-
read
- Specified by:
readin classInputStream- Throws:
IOException
-
read
- Overrides:
readin classInputStream- Throws:
IOException
-