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

java.lang.Object
  extended by java.io.Writer
      extended by java.io.FilterWriter
          extended by org.inria.ns.reflex.util.io.NoCloseWriter
All Implemented Interfaces:
Closeable, Flushable, Appendable

public class NoCloseWriter
extends FilterWriter

A filter that ignore Writer.close().

Author:
Philippe Poulard

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

Constructor Detail

NoCloseWriter

public NoCloseWriter(Writer out)
Create a NoCloseWriter.

Parameters:
out - The output writer.
Method Detail

close

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

Specified by:
close in interface Closeable
Overrides:
close in class FilterWriter
Throws:
IOException
See Also:
Writer.close()

doClose

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

Throws:
IOException
See Also:
Writer.close()