org.inria.ns.reflex.util.io
Class NoCloseOutputStream

java.lang.Object
  extended by java.io.OutputStream
      extended by java.io.FilterOutputStream
          extended by org.inria.ns.reflex.util.io.NoCloseOutputStream
All Implemented Interfaces:
Closeable, Flushable

public class NoCloseOutputStream
extends FilterOutputStream

A filter that ignore OutputStream.close().

Author:
Philippe Poulard

Constructor Summary
NoCloseOutputStream(OutputStream out)
          Create a NoCloseOutputStream.
 
Method Summary
 void close()
          Do not close.
 void doClose()
          Really close the output.
 
Methods inherited from class java.io.FilterOutputStream
flush, write, write, write
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NoCloseOutputStream

public NoCloseOutputStream(OutputStream out)
Create a NoCloseOutputStream.

Parameters:
out - The output stream.
Method Detail

close

public void close()
           throws IOException
Do not close. Use doClose() instead.

Specified by:
close in interface Closeable
Overrides:
close in class FilterOutputStream
Throws:
IOException
See Also:
doClose(), OutputStream.close()

doClose

public void doClose()
             throws IOException
Really close the output.

Throws:
IOException
See Also:
OutputStream.close()