Package org.apache.juneau.internal
Class NoCloseOutputStream
java.lang.Object
java.io.OutputStream
org.apache.juneau.internal.NoCloseOutputStream
- All Implemented Interfaces:
Closeable,Flushable,AutoCloseable
Wraps an existing
OutputStream where the close() method is a no-op.
Useful in cases where you're working with streams that should not be implicitly closed.
See Also:
-
Constructor Summary
Constructors -
Method Summary
Methods inherited from class java.io.OutputStream
nullOutputStream
-
Constructor Details
-
NoCloseOutputStream
Constructor.- Parameters:
os- The output stream to wrap.
-
-
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
-