public interface ReadStream<T> extends ExceptionSupport<T>
Any class that implements this interface can be used by a Pump to pump data from it
to a WriteStream.
This interface exposes a fluent api and the type T represents the type of the object that implements the interface to allow method chaining
| Modifier and Type | Method and Description |
|---|---|
T |
dataHandler(Handler<Buffer> handler)
Set a data handler.
|
T |
endHandler(Handler<java.lang.Void> endHandler)
Set an end handler.
|
T |
pause()
Pause the
ReadStream. |
T |
resume()
Resume reading.
|
exceptionHandlerT dataHandler(Handler<Buffer> handler)
T pause()
ReadStream. While the stream is paused, no data will be sent to the dataHandlerT resume()
ReadStream has been paused, reading will recommence on it.