Class BrotliInputStream
java.lang.Object
java.io.InputStream
org.brotli.wrapper.dec.BrotliInputStream
- All Implemented Interfaces:
Closeable, AutoCloseable
InputStream that wraps native brotli decoder.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final Decoderprivate static final intThe default internal buffer size used by the decoder. -
Constructor Summary
ConstructorsConstructorDescriptionBrotliInputStream(InputStream source) BrotliInputStream(InputStream source, int bufferSize) Creates a BrotliInputStream. -
Method Summary
Modifier and TypeMethodDescriptionvoidattachDictionary(ByteBuffer dictionary) intvoidclose()voidintread()intread(byte[] b) intread(byte[] b, int off, int len) longskip(long n) Methods inherited from class InputStream
mark, markSupported, reset
-
Field Details
-
DEFAULT_BUFFER_SIZE
private static final int DEFAULT_BUFFER_SIZEThe default internal buffer size used by the decoder.- See Also:
-
decoder
-
-
Constructor Details
-
BrotliInputStream
Creates a BrotliInputStream.- Parameters:
source- underlying sourcebufferSize- intermediate buffer size- Throws:
IOException
-
BrotliInputStream
- Throws:
IOException
-
-
Method Details
-
attachDictionary
- Throws:
IOException
-
enableEagerOutput
public void enableEagerOutput() -
close
- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Overrides:
closein classInputStream- Throws:
IOException
-
available
public int available()- Overrides:
availablein classInputStream
-
read
- Specified by:
readin classInputStream- Throws:
IOException
-
read
- Overrides:
readin classInputStream- Throws:
IOException
-
read
- Overrides:
readin classInputStream- Throws:
IOException
-
skip
- Overrides:
skipin classInputStream- Throws:
IOException
-