Package org.zeroturnaround.zip
Class CloseShieldInputStream
- java.lang.Object
-
- java.io.InputStream
-
- java.io.FilterInputStream
-
- org.zeroturnaround.zip.CloseShieldInputStream
-
- All Implemented Interfaces:
java.io.Closeable
,java.lang.AutoCloseable
class CloseShieldInputStream extends java.io.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 aZipInputStream
without closing the underlying stream itself.
-
-
Constructor Summary
Constructors Constructor Description CloseShieldInputStream(java.io.InputStream in)
Creates aFilterInputStream
by assigning the argumentin
to the fieldthis.in
so as to remember it for later use.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
close()
-
Methods inherited from class java.io.FilterInputStream
available, mark, markSupported, read, read, read, reset, skip
-
-
-
-
Constructor Detail
-
CloseShieldInputStream
public CloseShieldInputStream(java.io.InputStream in)
Creates aFilterInputStream
by assigning the argumentin
to the fieldthis.in
so as to remember it for later use.- Parameters:
in
- the underlying input stream, ornull
if this instance is to be created without an underlying stream.
-
-