- All Implemented Interfaces:
- Closeable, Flushable
public class CloseShieldOutputStream
- extends ProxyOutputStream
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.
- $Id: CloseShieldOutputStream.java 1304052 2012-03-22 20:55:29Z ggregory $
|Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
public CloseShieldOutputStream(OutputStream out)
- Creates a proxy that shields the given output stream from being
out - underlying output stream
public void close()
- Replaces the underlying output stream with a
sentinel. The original output stream will remain open, but this proxy
will appear closed.
- Specified by:
close in interface
close in class
Copyright © 2002-2012 The Apache Software Foundation. All Rights Reserved.