Class UnclosableInputStream
- java.lang.Object
-
- java.io.InputStream
-
- java.io.FilterInputStream
-
- org.arakhne.afc.inputoutput.stream.UnclosableInputStream
-
- All Implemented Interfaces:
Closeable,AutoCloseable
public class UnclosableInputStream extends FilterInputStream
An input 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.FilterInputStream
in
-
-
Constructor Summary
Constructors Constructor Description UnclosableInputStream(InputStream in)Construct.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()intread(byte[] buffer)Call directly the functionInputStream.read(byte[])on the filtered stream.intread(byte[] buffer, int offset, int len)Call directly the functionInputStream.read(byte[], int, int)on the filtered stream.-
Methods inherited from class java.io.FilterInputStream
available, mark, markSupported, read, reset, skip
-
Methods inherited from class java.io.InputStream
nullInputStream, readAllBytes, readNBytes, readNBytes, transferTo
-
-
-
-
Constructor Detail
-
UnclosableInputStream
public UnclosableInputStream(InputStream in) throws IOException
Construct.- Parameters:
in- input stream.- Throws:
IOException- on error.
-
-
Method Detail
-
close
public void close() throws IOException- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Overrides:
closein classFilterInputStream- Throws:
IOException
-
read
public int read(byte[] buffer, int offset, int len) throws IOExceptionCall directly the functionInputStream.read(byte[], int, int)on the filtered stream.- Overrides:
readin classFilterInputStream- Throws:
IOException
-
read
public int read(byte[] buffer) throws IOExceptionCall directly the functionInputStream.read(byte[])on the filtered stream.- Overrides:
readin classFilterInputStream- Throws:
IOException
-
-