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 void
attachDictionary(java.nio.ByteBuffer dictionary)
void
close()
boolean
isOpen()
int
read(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.IOException
Creates 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.IOException
Creates 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:
isOpen
in interfacejava.nio.channels.Channel
-
close
public void close() throws java.io.IOException
- Specified by:
close
in interfacejava.lang.AutoCloseable
- Specified by:
close
in interfacejava.nio.channels.Channel
- Specified by:
close
in interfacejava.io.Closeable
- Throws:
java.io.IOException
-
read
public int read(java.nio.ByteBuffer dst) throws java.io.IOException
- Specified by:
read
in interfacejava.nio.channels.ReadableByteChannel
- Throws:
java.io.IOException
-
-