org.freehep.util.io
Class NoCloseInputStream
java.lang.Object
java.io.InputStream
java.io.FilterInputStream
java.io.BufferedInputStream
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
Method Summary |
void |
close()
|
void |
realClose()
Close this stream (the normal close is ignored). |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
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 fromsize
- buffer size
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.