Class ZipArchiveInputStream.BoundCountInputStream

java.lang.Object
java.io.InputStream
java.io.FilterInputStream
org.apache.commons.io.input.ProxyInputStream
org.apache.commons.io.input.BoundedInputStream
org.apache.commons.compress.archivers.zip.ZipArchiveInputStream.BoundCountInputStream
All Implemented Interfaces:
Closeable, AutoCloseable
Enclosing class:
ZipArchiveInputStream

private final class ZipArchiveInputStream.BoundCountInputStream extends org.apache.commons.io.input.BoundedInputStream
Input stream adapted from commons-io.
  • Nested Class Summary

    Nested classes/interfaces inherited from class org.apache.commons.io.input.BoundedInputStream

    org.apache.commons.io.input.BoundedInputStream.Builder
  • Field Summary

    Fields inherited from class java.io.FilterInputStream

    in
  • Constructor Summary

    Constructors
    Constructor
    Description
    Creates a new BoundedInputStream that wraps the given input stream and limits it to a certain size.
  • Method Summary

    Modifier and Type
    Method
    Description
    private boolean
     
    int
     
    int
    read(byte[] b, int off, int len)
     
    private int
    readCount(int bytesRead)
     

    Methods inherited from class org.apache.commons.io.input.BoundedInputStream

    afterRead, available, builder, close, getCount, getMaxCount, getMaxLength, getRemaining, isPropagateClose, mark, markSupported, onMaxLength, read, reset, setPropagateClose, skip, toString

    Methods inherited from class org.apache.commons.io.input.ProxyInputStream

    beforeRead, handleIOException, unwrap

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
  • Constructor Details

    • BoundCountInputStream

      BoundCountInputStream(InputStream in, long max)
      Creates a new BoundedInputStream that wraps the given input stream and limits it to a certain size.
      Parameters:
      in - The wrapped input stream
      max - The maximum number of bytes to return
  • Method Details

    • atMaxLength

      private boolean atMaxLength()
    • read

      public int read() throws IOException
      Overrides:
      read in class org.apache.commons.io.input.BoundedInputStream
      Throws:
      IOException
    • read

      public int read(byte[] b, int off, int len) throws IOException
      Overrides:
      read in class org.apache.commons.io.input.BoundedInputStream
      Throws:
      IOException
    • readCount

      private int readCount(int bytesRead)