Package herddb.utils
Class NonClosingOutputStream
- java.lang.Object
-
- java.io.OutputStream
-
- java.io.FilterOutputStream
-
- herddb.utils.NonClosingOutputStream
-
- All Implemented Interfaces:
Closeable,Flushable,AutoCloseable
public class NonClosingOutputStream extends FilterOutputStream
FilterOutputStreamimplementation which doesn't propagateclose()invocations.Usefull when wrapped stream musn't be close but you want to wrap it in a try-with-resources manner
- Author:
- diego.salvi
-
-
Field Summary
-
Fields inherited from class java.io.FilterOutputStream
out
-
-
Constructor Summary
Constructors Constructor Description NonClosingOutputStream(OutputStream out)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()voidwrite(byte[] b, int off, int len)-
Methods inherited from class java.io.FilterOutputStream
flush, write, write
-
Methods inherited from class java.io.OutputStream
nullOutputStream
-
-
-
-
Constructor Detail
-
NonClosingOutputStream
public NonClosingOutputStream(OutputStream out)
-
-
Method Detail
-
close
public void close() throws IOException- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Overrides:
closein classFilterOutputStream- Throws:
IOException
-
write
public void write(byte[] b, int off, int len) throws IOException- Overrides:
writein classFilterOutputStream- Throws:
IOException
-
-