Class UnclosableOutputStream
- java.lang.Object
-
- java.io.OutputStream
-
- java.io.FilterOutputStream
-
- org.arakhne.afc.inputoutput.stream.UnclosableOutputStream
-
- All Implemented Interfaces:
Closeable,Flushable,AutoCloseable
public class UnclosableOutputStream extends FilterOutputStream
An output stream that is ignoring all request toclose().- Version:
- 17.0 2020-01-04 14:41:40
- Author:
- Stéphane GALLAND
- Maven Group Id:
- org.arakhne.afc.core
- Maven Artifact Id:
- inputoutput
-
-
Field Summary
-
Fields inherited from class java.io.FilterOutputStream
out
-
-
Constructor Summary
Constructors Constructor Description UnclosableOutputStream(OutputStream out)Construct.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()Do not close but still flush the filtered stream.voidwrite(byte[] buffer)Call directly the functionOutputStream.write(byte[])on the filtered stream.voidwrite(byte[] buffer, int offset, int len)Call directly the functionOutputStream.write(byte[], int, int)on the filtered stream.-
Methods inherited from class java.io.FilterOutputStream
flush, write
-
Methods inherited from class java.io.OutputStream
nullOutputStream
-
-
-
-
Constructor Detail
-
UnclosableOutputStream
public UnclosableOutputStream(OutputStream out) throws IOException
Construct.- Parameters:
out- output stream.- Throws:
IOException- on error.
-
-
Method Detail
-
close
public void close() throws IOExceptionDo not close but still flush the filtered stream.- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Overrides:
closein classFilterOutputStream- Throws:
IOException
-
write
public void write(byte[] buffer, int offset, int len) throws IOExceptionCall directly the functionOutputStream.write(byte[], int, int)on the filtered stream.- Overrides:
writein classFilterOutputStream- Throws:
IOException
-
write
public void write(byte[] buffer) throws IOExceptionCall directly the functionOutputStream.write(byte[])on the filtered stream.- Overrides:
writein classFilterOutputStream- Throws:
IOException
-
-