API / geotoolkit / util / stream / LineReader / LineReader
stream.LineReader.LineReader
Type Aliases
Ƭ CaptureCallbackResult: Object
The capture result
| Name | Type | Description |
|---|---|---|
end? | number | The end index (matching endRegex)or undefined if not found |
error? | Error | string | The error object if any error occurred, null otherwise |
lines? | string[] | The lines in between start and end |
start? | number | The start index (matching startRegex) or undefined if not found |
Ƭ Options: Object
The options
| Name | Type | Description |
|---|---|---|
chunksize? | number | The amount of bytes to read at once. The default value is 1 megabyte |
stream | IReadable | The data stream to be wrapped by this reader |
Ƭ captureCallback: (result: CaptureCallbackResult) => void
▸ (result): void
Callback for capture().
| Name | Type |
|---|---|
result | CaptureCallbackResult |
void
Ƭ findCallback: (err: Error | string, index?: number) => void
▸ (err, index?): void
Callback for find().
| Name | Type |
|---|---|
err | Error | string |
Optional index | number |
void
Ƭ readLinesCallback: (err: Error | string, index: number, result?: string[], eof?: boolean, progress?: number) => void
▸ (err, index, result?, eof?, progress?): void
Callback for readLines().
| Name | Type |
|---|---|
err | Error | string |
index | number |
Optional result | string[] |
Optional eof | boolean |
Optional progress | number |
void