org.freehep.util.io
Class NoCloseInputStream

java.lang.Object
  extended by java.io.InputStream
      extended by java.io.FilterInputStream
          extended by java.io.BufferedInputStream
              extended by org.freehep.util.io.NoCloseInputStream
All Implemented Interfaces:
Closeable

public class NoCloseInputStream
extends BufferedInputStream

The NoCloseInputStream ignores the close so that one can keep reading from the underlying stream.

Version:
$Id: NoCloseInputStream.java 8584 2006-08-10 23:06:37Z duns $
Author:
Mark Donszelmann

Field Summary
 
Fields inherited from class java.io.BufferedInputStream
buf, count, marklimit, markpos, pos
 
Fields inherited from class java.io.FilterInputStream
in
 
Constructor Summary
NoCloseInputStream(InputStream stream)
          Creates a No Close Input Stream.
NoCloseInputStream(InputStream stream, int size)
          Creates a No Close Input Stream.
 
Method Summary
 void close()
           
 void realClose()
          Close this stream (the normal close is ignored).
 
Methods inherited from class java.io.BufferedInputStream
available, mark, markSupported, read, read, reset, skip
 
Methods inherited from class java.io.FilterInputStream
read
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NoCloseInputStream

public NoCloseInputStream(InputStream stream)
Creates a No Close Input Stream.

Parameters:
stream - stream to read from

NoCloseInputStream

public NoCloseInputStream(InputStream stream,
                          int size)
Creates a No Close Input Stream.

Parameters:
stream - stream to read from
size - buffer size
Method Detail

close

public void close()
           throws IOException
Specified by:
close in interface Closeable
Overrides:
close in class BufferedInputStream
Throws:
IOException

realClose

public void realClose()
               throws IOException
Close this stream (the normal close is ignored).

Throws:
IOException - if close fails


Copyright © 2000-2007 FreeHEP. All Rights Reserved.