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 void
close()
Do not close but still flush the filtered stream.void
write(byte[] buffer)
Call directly the functionOutputStream.write(byte[])
on the filtered stream.void
write(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 IOException
Do not close but still flush the filtered stream.- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
- Overrides:
close
in classFilterOutputStream
- Throws:
IOException
-
write
public void write(byte[] buffer, int offset, int len) throws IOException
Call directly the functionOutputStream.write(byte[], int, int)
on the filtered stream.- Overrides:
write
in classFilterOutputStream
- Throws:
IOException
-
write
public void write(byte[] buffer) throws IOException
Call directly the functionOutputStream.write(byte[])
on the filtered stream.- Overrides:
write
in classFilterOutputStream
- Throws:
IOException
-
-