Package gov.usgs.util
Class StreamUtils.UnclosableInputStream
java.lang.Object
java.io.InputStream
java.io.FilterInputStream
gov.usgs.util.StreamUtils.UnclosableInputStream
- All Implemented Interfaces:
Closeable
,AutoCloseable
- Enclosing class:
- StreamUtils
An InputStream that ignores calls to close.
Used for methods that automatically close a stream at EOF, even though it is
undesirable for the stream to be closed, such as when using a ZipInputStream.
-
Field Summary
Fields inherited from class java.io.FilterInputStream
in
-
Constructor Summary
ConstructorsConstructorDescriptionCreate a new UnclosableInputStream object. -
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
-
UnclosableInputStream
Create a new UnclosableInputStream object.- Parameters:
in
- the InputStream to wrap.
-
-
Method Details
-
close
public void close()Does not close stream.- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
- Overrides:
close
in classFilterInputStream
-