# Class: RecordParser

## vertx-js/record_parser~ RecordParser

#### new RecordParser()

A helper class which allows you to easily parse protocols which are delimited by a sequence of bytes, or fixed size records.

Source:
  - vertx-js/record_parser.js, line 32

### Methods

#### delimitedMode(delim)

Flip the parser into delimited mode, and where the delimiter can be represented by the delimiter `delim`.

This method can be called multiple times with different values of delim while data is being parsed.

##### Parameters:

Name | Type | Description
--- | --- | ---
`delim` | Buffer | the new delimiter

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

#### endHandler(endHandler) → {RecordParser}

##### Parameters:

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

Source:
  - vertx-js/record_parser.js, line 164

##### Returns:

Type
  RecordParser

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

##### Parameters:

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

Source:
  - vertx-js/record_parser.js, line 104

##### Returns:

Type
  RecordParser

#### fixedSizeMode(size)

Flip the parser into fixed size mode, where the record size is specified by `size` in bytes.

This method can be called multiple times with different values of size while data is being parsed.

##### Parameters:

Name | Type | Description
--- | --- | ---
`size` | number | the new record size

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

#### handle(buffer)

This method is called to provide the parser with data.

##### Parameters:

Name | Type | Description
--- | --- | ---
`buffer` | Buffer | a chunk of data

Source:
  - vertx-js/record_parser.js, line 91

#### handler(handler) → {RecordParser}

##### Parameters:

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

Source:
  - vertx-js/record_parser.js, line 120

##### Returns:

Type
  RecordParser

#### pause() → {RecordParser}

Source:
  - vertx-js/record_parser.js, line 136

##### Returns:

Type
  RecordParser

#### resume() → {RecordParser}

Source:
  - vertx-js/record_parser.js, line 150

##### Returns:

Type
  RecordParser

#### setOutput(output)

##### Parameters:

Name | Type | Description
--- | --- | ---
`output` | function |

Source:
  - vertx-js/record_parser.js, line 43