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 TypeMethodDescriptionvoidattachDictionary(ByteBuffer dictionary) Creates a BrotliInputStreamintvoidclose()voidintread()intread(byte[] b) intread(byte[] b, int off, int len) longskip(long n) Methods inherited from class 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-ByteBuffercontaining dictionary- Throws:
IOException- If any failure during initialization
-
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
-