org.vertx.java.core.streams

## Interface ReadStream

All Known Implementing Classes:
  HttpClientResponse, org.vertx.java.core.http.impl.HttpReadStreamBase, HttpServerRequest, NetSocket, ServerWebSocket, SockJSSocket, WebSocket

    public interface ReadStream

Represents a stream of data that can be read from.

Any class that implements this interface can be used by a `Pump` to pump data from it to a `WriteStream`.

### Method Summary

Methods
`void` `dataHandler(Handler<Buffer> handler)` Set a data handler.
`void` `endHandler(Handler<java.lang.Void> endHandler)` Set an end handler.
`void` `exceptionHandler(Handler<java.lang.Exception> handler)` Set an exception handler.
`void` `pause()` Pause the `ReadStream`.
`void` `resume()` Resume reading.

### Method Detail

#### dataHandler

    void dataHandler(Handler<Buffer> handler)

Set a data handler. As data is read, the handler will be called with the data.

#### pause

    void pause()

Pause the `ReadStream`. While the stream is paused, no data will be sent to the `dataHandler`

#### resume

    void resume()

Resume reading. If the `ReadStream` has been paused, reading will recommence on it.

#### exceptionHandler

    void exceptionHandler(Handler<java.lang.Exception> handler)

Set an exception handler.

#### endHandler

    void endHandler(Handler<java.lang.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.