Package org.eclipse.rdf4j.common.io
Class UncloseableOutputStream
java.lang.Object
java.io.OutputStream
java.io.FilterOutputStream
org.eclipse.rdf4j.common.io.UncloseableOutputStream
- All Implemented Interfaces:
Closeable,Flushable,AutoCloseable
A wrapper for an output stream to avoid allowing libraries to close output streams unexpectedly using the
close() method. Instead, they must be closed by the creator using doClose().- Author:
- Bart Hanssens
-
Field Summary
Fields inherited from class java.io.FilterOutputStream
out -
Constructor Summary
Constructors -
Method Summary
Methods inherited from class java.io.FilterOutputStream
flush, write, write, writeMethods inherited from class java.io.OutputStream
nullOutputStream
-
Constructor Details
-
UncloseableOutputStream
Constructor- Parameters:
parent- output stream
-
-
Method Details
-
close
- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Overrides:
closein classFilterOutputStream- Throws:
IOException
-
doClose
Invoke close on FilterOutputStream parent class.- Throws:
IOException
-