Package org.brotli.wrapper.dec
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 Decoder
private static final int
The 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 TypeMethodDescriptionvoid
attachDictionary
(ByteBuffer dictionary) int
void
close()
void
int
read()
int
read
(byte[] b) int
read
(byte[] b, int off, int len) long
skip
(long n) Methods inherited from class java.io.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:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
- Overrides:
close
in classInputStream
- Throws:
IOException
-
available
public int available()- Overrides:
available
in classInputStream
-
read
- Specified by:
read
in classInputStream
- Throws:
IOException
-
read
- Overrides:
read
in classInputStream
- Throws:
IOException
-
read
- Overrides:
read
in classInputStream
- Throws:
IOException
-
skip
- Overrides:
skip
in classInputStream
- Throws:
IOException
-