Package org.eclipse.rdf4j.common.io
Class UncloseableInputStream
java.lang.Object
java.io.InputStream
java.io.FilterInputStream
org.eclipse.rdf4j.common.io.UncloseableInputStream
- All Implemented Interfaces:
Closeable,AutoCloseable
A wrapper for an input stream to avoid allowing libraries to close input streams unexpectedly using the
close() method. Instead, they must be closed by the creator using doClose().- Author:
- Peter Ansell
-
Field Summary
Fields inherited from class java.io.FilterInputStream
in -
Constructor Summary
Constructors -
Method Summary
Methods inherited from class java.io.FilterInputStream
available, mark, markSupported, read, read, read, reset, skipMethods inherited from class java.io.InputStream
nullInputStream, readAllBytes, readNBytes, readNBytes, transferTo
-
Constructor Details
-
UncloseableInputStream
Constructor- Parameters:
parent- input stream
-
-
Method Details
-
close
- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Overrides:
closein classFilterInputStream- Throws:
IOException
-
doClose
Invoke close on FilterInputStream parent class.- Throws:
IOException
-