Package net.automatalib.common.util.io
Class UnclosableInputStream
- java.lang.Object
-
- java.io.InputStream
-
- net.automatalib.common.util.io.UnclosableInputStream
-
- All Implemented Interfaces:
Closeable,AutoCloseable
public class UnclosableInputStream extends InputStream
A delegating input stream that throws an exception when closed. This is mainly used for testing purposes.
-
-
Constructor Summary
Constructors Constructor Description UnclosableInputStream(InputStream delegate)
-
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, read, read, reset, skip
-
-
-
-
Constructor Detail
-
UnclosableInputStream
public UnclosableInputStream(InputStream delegate)
-
-
Method Detail
-
close
public void close()
- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Overrides:
closein classInputStream
-
read
public int read() throws IOException- Specified by:
readin classInputStream- Throws:
IOException
-
-