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

java.lang.Object
  extended by java.io.Reader
      extended by java.io.FilterReader
          extended by org.inria.ns.reflex.util.io.NoCloseReader
All Implemented Interfaces:
Closeable, Readable

public class NoCloseReader
extends FilterReader

A filter that ignore Reader.close().

Author:
Philippe Poulard

Constructor Summary
NoCloseReader(Reader in)
          Create a NoCloseReader.
 
Method Summary
 void close()
          Do not close.
 void doClose()
          Really close the input.
 
Methods inherited from class java.io.FilterReader
mark, markSupported, read, read, ready, reset, skip
 
Methods inherited from class java.io.Reader
read, read
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NoCloseReader

public NoCloseReader(Reader in)
Create a NoCloseReader.

Parameters:
in - The input reader.
Method Detail

close

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

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

doClose

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

Throws:
IOException
See Also:
Reader.close()