org.apache.commons.io.output
Class 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.
$Id: CloseShieldOutputStream.java 587913 2007-10-24 15:47:30Z niallp $
CloseShieldOutputStream
public CloseShieldOutputStream(OutputStream out)
Creates a proxy that shields the given output stream from being
closed.
out
- underlying output stream
close
public void close()
Replaces the underlying output stream with a
ClosedOutputStream
sentinel. The original output stream will remain open, but this proxy
will appear closed.
- close in interface ProxyOutputStream
Copyright (c) 2002-2008 Apache Software Foundation