|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.io.InputStream
java.io.FilterInputStream
com.gc.iotools.stream.is.CloseOnceInputStream<T>
public class CloseOnceInputStream<T>
A CloseOnceInputStream contains some other input stream, which
it uses as its basic source of data. The class
CloseOnceInputStream pass all requests to the contained input
stream, except the close() method that is passed only one time
to the underlying stream.
Multiple invocation of the close() method will result in only
one invocation of the same method on the underlying stream. This is useful
with some buggy InputStream that don't allow
close() to be called multiple times.
| Field Summary |
|---|
| Fields inherited from class java.io.FilterInputStream |
|---|
in |
| Constructor Summary | |
|---|---|
CloseOnceInputStream(InputStream source)
|
|
| Method Summary | |
|---|---|
void |
close()
Multiple invocation of this method will result in only one invocation of the close() on the underlying stream. |
int |
getCloseCount()
Deprecated. use DiagnosticInputStream instead. |
T |
getWrappedInputStream()
Returns the wrapped (original) InputStream passed in the
constructor. |
| Methods inherited from class java.io.FilterInputStream |
|---|
available, mark, markSupported, read, read, read, reset, skip |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public CloseOnceInputStream(InputStream source)
| Method Detail |
|---|
public void close()
throws IOException
Multiple invocation of this method will result in only one invocation of
the close() on the underlying stream.
close in interface Closeableclose in class FilterInputStreamIOException - Exception thrown if some error happens into the underlying
stream.public int getCloseCount()
com.gc.iotools.stream.is.inspection.DiagnosticInputStream.javapublic T getWrappedInputStream()
Returns the wrapped (original) InputStream passed in the
constructor.
InputStream passed in the constructor
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||