public interface ReadStream<T> extends StreamBase
Represents a stream of data that can be read from.<p>
Any class that implements this interface can be used by a Pump
to pump data from it
to a WriteStream
.<p>
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 |
---|---|
ReadStream<T> |
endHandler(Handler<Void> endHandler)
Set an end handler.
|
ReadStream<T> |
exceptionHandler(Handler<Throwable> handler)
Set an exception handler.
|
ReadStream<T> |
handler(Handler<T> handler)
Set a data handler.
|
ReadStream<T> |
pause()
Pause the
ReadSupport . |
ReadStream<T> |
resume()
Resume reading.
|
ReadStream<T> exceptionHandler(Handler<Throwable> handler)
StreamBase
Set an exception handler.
exceptionHandler
in interface StreamBase
ReadStream<T> handler(Handler<T> handler)
Set a data handler. As data is read, the handler will be called with the data.
ReadStream<T> pause()
Pause the ReadSupport
. While it’s paused, no data will be sent to the dataHandler
ReadStream<T> resume()
Resume reading. If the ReadSupport
has been paused, reading will recommence on it.
ReadStream<T> endHandler(Handler<Void> endHandler)
Set an end handler. Once the stream has ended, and there is no more data to be read, this handler will be called.
Copyright © 2014. All Rights Reserved.