Package network.oxalis.commons.io
Class UnclosableInputStream
- java.lang.Object
-
- java.io.InputStream
-
- network.oxalis.commons.io.UnclosableInputStream
-
- All Implemented Interfaces:
Closeable,AutoCloseable
public class UnclosableInputStream extends InputStream
Simple wrapper of an InputStream making sure the close method on the encapsulated InputStream is never called.- Since:
- 4.0.0
- Author:
- erlend
-
-
Constructor Summary
Constructors Constructor Description UnclosableInputStream(InputStream inputStream)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()intread()-
Methods inherited from class java.io.InputStream
available, mark, markSupported, nullInputStream, read, read, readAllBytes, readNBytes, readNBytes, reset, skip, transferTo
-
-
-
-
Constructor Detail
-
UnclosableInputStream
public UnclosableInputStream(InputStream inputStream)
-
-
Method Detail
-
read
public int read() throws IOException- Specified by:
readin classInputStream- Throws:
IOException
-
close
public void close() throws IOException- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Overrides:
closein classInputStream- Throws:
IOException
-
-