bb.io
Class StreamDrainerForwarding.UnitTest.Crashes
java.lang.Object
bb.io.StreamDrainerForwarding
bb.io.StreamDrainerForwarding.UnitTest.Crashes
- All Implemented Interfaces:
- StreamDrainer, Runnable
- Enclosing class:
- StreamDrainerForwarding.UnitTest
private static class StreamDrainerForwarding.UnitTest.Crashes
- extends StreamDrainerForwarding
StreamDrainerForwarding subclass which overrides onBytesRead
to always throw a RuntimeException.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
StreamDrainerForwarding.UnitTest.Crashes
private StreamDrainerForwarding.UnitTest.Crashes(InputStream in,
OutputStream out)
throws IllegalArgumentException
- Throws:
IllegalArgumentException
onBytesRead
protected void onBytesRead(byte[] buffer,
int numberRead)
throws RuntimeException
- Description copied from class:
StreamDrainerForwarding
- Hook method for the event that bytes were read from
StreamDrainerForwarding.in
by run
.
When this method is called, run will have already written those bytes to StreamDrainerForwarding.out
.
The implementation here does nothing, because writing to out is all that this class does.
Subclasses, however, may wish to do additional processing.
For example, if the subclass is monitoring some error stream like System.err,
then it may wish to do additional error notification.
- Overrides:
onBytesRead
in class StreamDrainerForwarding
- Throws:
RuntimeException