Class BrotliInputStream
java.lang.Object
java.io.InputStream
com.aayushatharva.brotli4j.decoder.BrotliInputStream
- All Implemented Interfaces:
Closeable
,AutoCloseable
InputStream that wraps native brotli decoder.
-
Constructor Summary
ConstructorsConstructorDescriptionBrotliInputStream
(InputStream source) Creates a BrotliInputStreamBrotliInputStream
(InputStream source, int bufferSize) Creates a BrotliInputStream -
Method Summary
Modifier and TypeMethodDescriptionvoid
attachDictionary
(ByteBuffer dictionary) Creates a BrotliInputStreamint
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, nullInputStream, readAllBytes, readNBytes, readNBytes, reset, skipNBytes, transferTo
-
Constructor Details
-
BrotliInputStream
Creates a BrotliInputStream- Parameters:
source
- underlying sourcebufferSize
- intermediate buffer size- Throws:
IOException
- If any failure during initialization
-
BrotliInputStream
Creates a BrotliInputStream- Parameters:
source
- underlying source- Throws:
IOException
- If any failure during initialization
-
-
Method Details
-
attachDictionary
Creates a BrotliInputStream- Parameters:
dictionary
-ByteBuffer
containing dictionary- Throws:
IOException
- If any failure during initialization
-
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
-