CompressedInputStream (apache-cassandra API)
Date: 2014-10-21

org.apache.cassandra.streaming.compress

## Class CompressedInputStream

- java.lang.Object
- - java.io.InputStream
  - - org.apache.cassandra.streaming.compress.CompressedInputStream

- All Implemented Interfaces:
    java.io.Closeable, java.lang.AutoCloseable

      public class CompressedInputStream
      extends java.io.InputStream

  InputStream which reads data from underlining source with given `CompressionInfo`.

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `protected long` | `bufferOffset`
    `protected int` | `validBufferBytes`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `CompressedInputStream(java.io.InputStream source, CompressionInfo info, boolean hasPostCompressionAdlerChecksums)`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `long` | `getTotalCompressedBytesRead()`
    `void` | `position(long position)`
    `int` | `read()`

    - ### Methods inherited from class java.io.InputStream

      `available, close, mark, markSupported, read, read, reset, skip`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### bufferOffset

          protected long bufferOffset

    - #### validBufferBytes

          protected int validBufferBytes

  - ### Constructor Detail

    - #### CompressedInputStream

          public CompressedInputStream(java.io.InputStream source,
                               CompressionInfo info,
                               boolean hasPostCompressionAdlerChecksums)

      Parameters:
        `source` - Input source to read compressed data from
        `info` - Compression info

  - ### Method Detail

    - #### read

          public int read()
                   throws java.io.IOException

      Specified by:
        `read` in class `java.io.InputStream`
      Throws:
        `java.io.IOException`

    - #### position

          public void position(long position)

    - #### getTotalCompressedBytesRead

          public long getTotalCompressedBytesRead()

Copyright © 2014 The Apache Software Foundation