Class CloseShieldInputStream

java.lang.Object
java.io.InputStream
java.io.FilterInputStream
org.zeroturnaround.zip.CloseShieldInputStream
All Implemented Interfaces:
Closeable, AutoCloseable

class CloseShieldInputStream extends FilterInputStream
Filter stream that prevents the underlying input stream from being closed.

It's a simpler version than org.apache.commons.io.input.CloseShieldInputStream as it doesn't replace the underlying stream. It's only meant for internal use where we can close a ZipInputStream without closing the underlying stream itself.

  • Constructor Details

    • CloseShieldInputStream

      public CloseShieldInputStream(InputStream in)
      Creates a FilterInputStream by assigning the argument in to the field this.in so as to remember it for later use.
      Parameters:
      in - the underlying input stream, or null if this instance is to be created without an underlying stream.
  • Method Details