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 void
close()
int
read()
-
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:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
- Overrides:
close
in classInputStream
-
read
public int read() throws IOException
- Specified by:
read
in classInputStream
- Throws:
IOException
-
-