Class ZipArchiveInputStream.BoundedInputStream

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

private class ZipArchiveInputStream.BoundedInputStream extends InputStream
Bounded input stream adapted from commons-io
  • Field Details

    • in

      private final InputStream in
      the wrapped input stream
    • max

      private final long max
      the max length to provide
    • pos

      private long pos
      the number of bytes already returned
  • Constructor Details

    • BoundedInputStream

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