Class CompressedStreamInput<T extends CompressorContext>

    • Field Detail

      • uncompressed

        protected byte[] uncompressed
    • Method Detail

      • resetToBufferStart

        public void resetToBufferStart()
        Expert!, resets to buffer start, without the need to decompress it again.
      • available

        public int available()
                      throws IOException
        Method is overridden to report number of bytes that can now be read from decoded data buffer, without reading bytes from the underlying stream. Never throws an exception; returns number of bytes available without further reads from underlying source; -1 if stream has been closed, or 0 if an actual read (and possible blocking) is needed to find out.
        Overrides:
        available in class  InputStream
        Throws:
        IOException
      • read

        public int read(byte[] buffer,
                        int offset,
                        int length,
                        boolean fullRead)
                 throws IOException
        Throws:
        IOException
      • readBytes

        public void readBytes(byte[] b,
                              int offset,
                              int len)
                       throws IOException
        Description copied from class: StreamInput
        Reads a specified number of bytes into an array at the specified offset.
        Specified by:
        readBytes in class  StreamInput
        Parameters:
        b - the array to read bytes into
        offset - the offset in the array to start storing bytes
        len - the number of bytes to read
        Throws:
        IOException
      • readyBuffer

        protected boolean readyBuffer()
                               throws IOException
        Fill the uncompressed bytes buffer by reading the underlying inputStream.
        Throws:
        IOException
      • uncompress

        protected abstract int uncompress(StreamInput in,
                                          byte[] out)
                                   throws IOException
        Uncompress the data into the out array, returning the size uncompressed
        Throws:
        IOException