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 void
close()
int
read(byte[] buffer)
Call directly the functionInputStream.read(byte[])
on the filtered stream.int
read(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:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
- Overrides:
close
in classFilterInputStream
- Throws:
IOException
-
read
public int read(byte[] buffer, int offset, int len) throws IOException
Call directly the functionInputStream.read(byte[], int, int)
on the filtered stream.- Overrides:
read
in classFilterInputStream
- Throws:
IOException
-
read
public int read(byte[] buffer) throws IOException
Call directly the functionInputStream.read(byte[])
on the filtered stream.- Overrides:
read
in classFilterInputStream
- Throws:
IOException
-
-