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

java.lang.Object
  extended by java.io.InputStream
      extended by java.io.FilterInputStream
          extended by org.inria.ns.reflex.util.io.NoCloseInputStream
All Implemented Interfaces:
Closeable

public class NoCloseInputStream
extends FilterInputStream

A filter that ignore InputStream.close().

Author:
Philippe Poulard

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

Constructor Detail

NoCloseInputStream

public NoCloseInputStream(InputStream in)
Create a NoCloseInputStream.

Parameters:
in - The input 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 FilterInputStream
Throws:
IOException
See Also:
doClose(), InputStream.close()

doClose

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

Throws:
IOException
See Also:
InputStream.close()