Module net.automatalib.common.util
Package net.automatalib.common.util.io
Class NonClosingOutputStream
java.lang.Object
java.io.OutputStream
net.automatalib.common.util.io.NonClosingOutputStream
- All Implemented Interfaces:
Closeable,Flushable,AutoCloseable
A delegating output stream that does not close but flush the delegate output stream. This is mainly useful for
scenarios where we want to close wrappers (to free their resources) but do not want to close the source stream.
-
Constructor Summary
Constructors -
Method Summary
Methods inherited from class java.io.OutputStream
nullOutputStream
-
Constructor Details
-
NonClosingOutputStream
-
-
Method Details
-
write
- Specified by:
writein classOutputStream- Throws:
IOException
-
write
- Overrides:
writein classOutputStream- Throws:
IOException
-
write
- Overrides:
writein classOutputStream- Throws:
IOException
-
flush
- Specified by:
flushin interfaceFlushable- Overrides:
flushin classOutputStream- Throws:
IOException
-
close
- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Overrides:
closein classOutputStream- Throws:
IOException
-