|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.io.OutputStream
java.io.FilterOutputStream
org.apache.commons.io.output.ProxyOutputStream
org.apache.commons.io.output.CloseShieldOutputStream
public class CloseShieldOutputStream
Proxy stream that prevents the underlying output stream from being closed.
This class is typically used in cases where an output stream needs to be passed to a component that wants to explicitly close the stream even if other components would still use the stream for output.
Field Summary |
---|
Fields inherited from class java.io.FilterOutputStream |
---|
out |
Constructor Summary | |
---|---|
CloseShieldOutputStream(java.io.OutputStream out)
Creates a proxy that shields the given output stream from being closed. |
Method Summary | |
---|---|
void |
close()
Replaces the underlying output stream with a ClosedOutputStream
sentinel. |
Methods inherited from class org.apache.commons.io.output.ProxyOutputStream |
---|
afterWrite, beforeWrite, flush, handleIOException, write, write, write |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public CloseShieldOutputStream(java.io.OutputStream out)
out
- underlying output streamMethod Detail |
---|
public void close()
ClosedOutputStream
sentinel. The original output stream will remain open, but this proxy
will appear closed.
close
in interface java.io.Closeable
close
in class ProxyOutputStream
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |