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:
- java.io.Closeable, java.lang.AutoCloseable
public class NoCloseInputStream extends java.io.BufferedInputStreamThe NoCloseInputStream ignores the close so that one can keep reading from the underlying stream.
-
-
Constructor Summary
Constructors Constructor and Description NoCloseInputStream(java.io.InputStream stream)Creates a No Close Input Stream.NoCloseInputStream(java.io.InputStream stream, int size)Creates a No Close Input Stream.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description voidclose()voidrealClose()Close this stream (the normal close is ignored).
-
-
-
Constructor Detail
-
NoCloseInputStream
public NoCloseInputStream(java.io.InputStream stream)
Creates a No Close Input Stream.- Parameters:
stream- stream to read from
-
NoCloseInputStream
public NoCloseInputStream(java.io.InputStream stream, int size)Creates a No Close Input Stream.- Parameters:
stream- stream to read fromsize- buffer size
-
-
Method Detail
-
close
public void close() throws java.io.IOException- Specified by:
closein interfacejava.io.Closeable- Specified by:
closein interfacejava.lang.AutoCloseable- Overrides:
closein classjava.io.BufferedInputStream- Throws:
java.io.IOException
-
realClose
public void realClose() throws java.io.IOExceptionClose this stream (the normal close is ignored).- Throws:
java.io.IOException- if close fails
-
-
DMelt 3.0 © DataMelt by jWork.ORG