Class CompressorInputStream

    • Field Summary

      Fields 
      Modifier and Type Field Description
      private long bytesRead  
    • Constructor Summary

      Constructors 
      Constructor Description
      CompressorInputStream()
      Constructs a new instance.
    • Method Summary

      All Methods Instance Methods Concrete Methods Deprecated Methods 
      Modifier and Type Method Description
      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()
      Gets the current number of bytes read from this stream.
      int getCount()
      Deprecated.
      this method may yield wrong results for large archives, use #getBytesRead instead
      long getUncompressedCount()
      Gets the amount of raw or compressed bytes read by the stream.
      protected void pushedBackBytes​(long pushedBack)
      Decrements the counter of already read bytes.
      • Methods inherited from class java.io.InputStream

        available, close, mark, markSupported, nullInputStream, read, read, read, readAllBytes, readNBytes, readNBytes, reset, skip, transferTo
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • bytesRead

        private long bytesRead
    • Constructor Detail

      • CompressorInputStream

        public CompressorInputStream()
        Constructs a new instance.
    • 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:
        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
      • getBytesRead

        public long getBytesRead()
        Gets the current number of bytes read from this stream.
        Returns:
        the number of read bytes
        Since:
        1.1
      • getCount

        @Deprecated
        public int getCount()
        Deprecated.
        this method may yield wrong results for large archives, use #getBytesRead instead
        Gets the current number of bytes read from this stream.
        Returns:
        the number of read bytes
      • getUncompressedCount

        public long getUncompressedCount()
        Gets the amount of raw or compressed bytes read by the stream.

        This implementation invokes getBytesRead().

        Provides half of InputStreamStatistics without forcing subclasses to implement the other half.

        Returns:
        the amount of decompressed bytes returned by the stream
        Since:
        1.17
      • pushedBackBytes

        protected void pushedBackBytes​(long pushedBack)
        Decrements the counter of already read bytes.
        Parameters:
        pushedBack - the number of bytes pushed back.
        Since:
        1.7