Package net.automatalib.common.util.io
Class UnclosableOutputStream
- java.lang.Object
-
- java.io.OutputStream
-
- net.automatalib.common.util.io.UnclosableOutputStream
-
- All Implemented Interfaces:
Closeable
,Flushable
,AutoCloseable
public class UnclosableOutputStream extends OutputStream
A delegating output stream that throws an exception when closed. This is mainly used for testing purposes.
-
-
Constructor Summary
Constructors Constructor Description UnclosableOutputStream(OutputStream delegate)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
close()
void
write(int b)
-
Methods inherited from class java.io.OutputStream
flush, write, write
-
-
-
-
Constructor Detail
-
UnclosableOutputStream
public UnclosableOutputStream(OutputStream delegate)
-
-
Method Detail
-
close
public void close()
- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
- Overrides:
close
in classOutputStream
-
write
public void write(int b) throws IOException
- Specified by:
write
in classOutputStream
- Throws:
IOException
-
-