Package gov.usgs.util
Class StreamUtils.UnclosableOutputStream
java.lang.Object
java.io.OutputStream
java.io.FilterOutputStream
gov.usgs.util.StreamUtils.UnclosableOutputStream
- All Implemented Interfaces:
Closeable
,Flushable
,AutoCloseable
- Enclosing class:
- StreamUtils
An OutputStream that ignores calls to close.
Used for methods that automatically close a stream, even though it is
undesirable for the stream to be closed, such as when using a
ZipOutputStream.
-
Field Summary
Fields inherited from class java.io.FilterOutputStream
out
-
Constructor Summary
ConstructorsConstructorDescriptionCreate a new UnclosableOutputStream object. -
Method Summary
Methods inherited from class java.io.FilterOutputStream
flush, write, write, write
Methods inherited from class java.io.OutputStream
nullOutputStream
-
Constructor Details
-
UnclosableOutputStream
Create a new UnclosableOutputStream object.- Parameters:
out
- the OutputStream to wrap.
-
-
Method Details
-
close
Flush written content, but does not close stream.- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
- Overrides:
close
in classFilterOutputStream
- Throws:
IOException
-