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 FilterInputStream
in -
Constructor Summary
ConstructorsConstructorDescriptionCreates aFilterInputStreamby assigning the argumentinto the fieldthis.inso as to remember it for later use. -
Method Summary
Methods inherited from class FilterInputStream
available, mark, markSupported, read, read, read, reset, skipMethods inherited from class InputStream
nullInputStream, readAllBytes, readNBytes, readNBytes, skipNBytes, transferTo
-
Constructor Details
-
CloseShieldInputStream
Creates aFilterInputStreamby assigning the argumentinto the fieldthis.inso as to remember it for later use.- Parameters:
in- the underlying input stream, ornullif this instance is to be created without an underlying stream.
-
-
Method Details
-
close
- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Overrides:
closein classFilterInputStream- Throws:
IOException
-