Package org.bouncycastle.util.test
Class UncloseableOutputStream
- java.lang.Object
-
- java.io.OutputStream
-
- java.io.FilterOutputStream
-
- org.bouncycastle.util.test.UncloseableOutputStream
-
- All Implemented Interfaces:
Closeable
,Flushable
,AutoCloseable
public class UncloseableOutputStream extends FilterOutputStream
This is a testing utility class to check the property that anOutputStream
is never closed in some particular context - typically when wrapped by anotherOutputStream
that should not be forwarding itsOutputStream.close()
calls. Not needed in production code.
-
-
Field Summary
-
Fields inherited from class java.io.FilterOutputStream
out
-
-
Constructor Summary
Constructors Constructor Description UncloseableOutputStream(OutputStream s)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
close()
void
write(byte[] b, int off, int len)
-
Methods inherited from class java.io.FilterOutputStream
flush, write, write
-
Methods inherited from class java.io.OutputStream
nullOutputStream
-
-
-
-
Constructor Detail
-
UncloseableOutputStream
public UncloseableOutputStream(OutputStream s)
-
-
Method Detail
-
close
public void close()
- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
- Overrides:
close
in classFilterOutputStream
-
write
public void write(byte[] b, int off, int len) throws IOException
- Overrides:
write
in classFilterOutputStream
- Throws:
IOException
-
-