# Class: ReadStream

## vertx-js/read_stream~ ReadStream

#### new ReadStream()

Represents a stream of items that can be read from.

Source:
  - vertx-js/read_stream.js, line 30

### Methods

#### endHandler(endHandler) → {ReadStream}

Set an end handler. Once the stream has ended, and there is no more data to be read, this handler will be called.

##### Parameters:

Name | Type | Description
--- | --- | ---
`endHandler` | function |

Source:
  - vertx-js/read_stream.js, line 108

##### Returns:

a reference to this, so the API can be used fluently

Type
  ReadStream

#### exceptionHandler(handler) → {ReadStream}

Set an exception handler on the read stream.

##### Parameters:

Name | Type | Description
--- | --- | ---
`handler` | function | the exception handler

Source:
  - vertx-js/read_stream.js, line 44

##### Returns:

a reference to this, so the API can be used fluently

Type
  ReadStream

#### handler(handler) → {ReadStream}

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

##### Parameters:

Name | Type | Description
--- | --- | ---
`handler` | function |

Source:
  - vertx-js/read_stream.js, line 61

##### Returns:

a reference to this, so the API can be used fluently

Type
  ReadStream

#### pause() → {ReadStream}

Pause the `ReadSupport`. While it's paused, no data will be sent to the `dataHandler`

Source:
  - vertx-js/read_stream.js, line 78

##### Returns:

a reference to this, so the API can be used fluently

Type
  ReadStream

#### resume() → {ReadStream}

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

Source:
  - vertx-js/read_stream.js, line 93

##### Returns:

a reference to this, so the API can be used fluently

Type
  ReadStream