Package org.zeroturnaround.zip
Class CloseShieldInputStream
java.lang.Object
java.io.InputStream
java.io.FilterInputStream
org.zeroturnaround.zip.CloseShieldInputStream
- All Implemented Interfaces:
Closeable
,AutoCloseable
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.
-
Field Summary
Fields inherited from class java.io.FilterInputStream
in
-
Constructor Summary
ConstructorsConstructorDescriptionCreates aFilterInputStream
by assigning the argumentin
to the fieldthis.in
so as to remember it for later use. -
Method Summary
Methods inherited from class java.io.FilterInputStream
available, mark, markSupported, read, read, read, reset, skip
Methods inherited from class java.io.InputStream
nullInputStream, readAllBytes, readNBytes, readNBytes, skipNBytes, transferTo
-
Constructor Details
-
CloseShieldInputStream
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.
-
-
Method Details
-
close
- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
- Overrides:
close
in classFilterInputStream
- Throws:
IOException
-