Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.apache.commons.compress.compressors
Class CompressorInputStream

    java.lang.Object
      java.io.InputStream
          org.apache.commons.compress.compressors.CompressorInputStream

All Implemented Interfaces:
  Closeable

Direct Known Subclasses:
  BZip2CompressorInputStream, GzipCompressorInputStream, Pack200CompressorInputStream

    public abstract class CompressorInputStream

extends InputStream

Constructor Summary
`CompressorInputStream()`

Method Summary
`protected void` | `count(int read)` Increments the counter of already read bytes.
`protected void` | `count(long read)` Increments the counter of already read bytes.
`long` | `getBytesRead()` Returns the current number of bytes read from this stream.
`int` | `getCount()` Deprecated. this method may yield wrong results for large archives, use #getBytesRead instead

Methods inherited from class java.io.InputStream
`available, close, mark, markSupported, read, read, read, reset, skip`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### CompressorInputStream

    public CompressorInputStream()

Method Detail

### count

    protected void count(int read)

  Increments the counter of already read bytes. Doesn't increment if the EOF has been hit (read == -1)

  Parameters:
    `read` - the number of bytes read
  Since:
    Apache Commons Compress 1.1

### count

    protected void count(long read)

  Increments the counter of already read bytes. Doesn't increment if the EOF has been hit (read == -1)

  Parameters:
    `read` - the number of bytes read

### getCount

    @Deprecated
    public int getCount()

  Deprecated. this method may yield wrong results for large archives, use #getBytesRead instead

  Returns the current number of bytes read from this stream.

  Returns:
    the number of read bytes

### getBytesRead

    public long getBytesRead()

  Returns the current number of bytes read from this stream.

  Returns:
    the number of read bytes
  Since:
    Apache Commons Compress 1.1

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2011 The Apache Software Foundation. All Rights Reserved.