Class BrotliDecoderChannel
- java.lang.Object
-
- com.aayushatharva.brotli4j.decoder.Decoder
-
- com.aayushatharva.brotli4j.decoder.BrotliDecoderChannel
-
- All Implemented Interfaces:
java.io.Closeable,java.lang.AutoCloseable,java.nio.channels.Channel,java.nio.channels.ReadableByteChannel
public class BrotliDecoderChannel extends Decoder implements java.nio.channels.ReadableByteChannel
ReadableByteChannel that wraps native brotli decoder.
-
-
Constructor Summary
Constructors Constructor Description BrotliDecoderChannel(java.nio.channels.ReadableByteChannel source)Creates a BrotliDecoderChannel.BrotliDecoderChannel(java.nio.channels.ReadableByteChannel source, int bufferSize)Creates a BrotliDecoderChannel.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidattachDictionary(java.nio.ByteBuffer dictionary)voidclose()booleanisOpen()intread(java.nio.ByteBuffer dst)-
Methods inherited from class com.aayushatharva.brotli4j.decoder.Decoder
decompress, enableEagerOutput
-
-
-
-
Constructor Detail
-
BrotliDecoderChannel
public BrotliDecoderChannel(java.nio.channels.ReadableByteChannel source) throws java.io.IOExceptionCreates a BrotliDecoderChannel.- Parameters:
source- underlying source- Throws:
java.io.IOException- If any failure during initialization
-
BrotliDecoderChannel
public BrotliDecoderChannel(java.nio.channels.ReadableByteChannel source, int bufferSize) throws java.io.IOExceptionCreates a BrotliDecoderChannel.- Parameters:
source- underlying sourcebufferSize- intermediate buffer size- Throws:
java.io.IOException- If any failure during initialization
-
-
Method Detail
-
attachDictionary
public void attachDictionary(java.nio.ByteBuffer dictionary) throws java.io.IOException- Throws:
java.io.IOException
-
isOpen
public boolean isOpen()
- Specified by:
isOpenin interfacejava.nio.channels.Channel
-
close
public void close() throws java.io.IOException- Specified by:
closein interfacejava.lang.AutoCloseable- Specified by:
closein interfacejava.nio.channels.Channel- Specified by:
closein interfacejava.io.Closeable- Throws:
java.io.IOException
-
read
public int read(java.nio.ByteBuffer dst) throws java.io.IOException- Specified by:
readin interfacejava.nio.channels.ReadableByteChannel- Throws:
java.io.IOException
-
-