Class 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.
    • 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 source
        bufferSize - 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 interface java.nio.channels.Channel
      • close

        public void close()
                   throws java.io.IOException
        Specified by:
        close in interface java.lang.AutoCloseable
        Specified by:
        close in interface java.nio.channels.Channel
        Specified by:
        close in interface java.io.Closeable
        Throws:
        java.io.IOException
      • read

        public int read​(java.nio.ByteBuffer dst)
                 throws java.io.IOException
        Specified by:
        read in interface java.nio.channels.ReadableByteChannel
        Throws:
        java.io.IOException