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
-
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:
write
in classOutputStream
- Throws:
IOException
-
write
- Overrides:
write
in classOutputStream
- Throws:
IOException
-
write
- Overrides:
write
in classOutputStream
- Throws:
IOException
-
flush
- Specified by:
flush
in interfaceFlushable
- Overrides:
flush
in classOutputStream
- Throws:
IOException
-
close
- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
- Overrides:
close
in classOutputStream
- Throws:
IOException
-