Last updated

API / geotoolkit / util / stream / LineReader / LineReader

Namespace: LineReader

stream.LineReader.LineReader

Table of contents

Type Aliases

Contents

Type Aliases

CaptureCallbackResult

Ƭ CaptureCallbackResult: Object

The capture result

Type declaration

NameTypeDescription
end?numberThe end index (matching endRegex)or undefined if not found
error?Error | stringThe error object if any error occurred, null otherwise
lines?string[]The lines in between start and end
start?numberThe start index (matching startRegex) or undefined if not found

Options

Ƭ Options: Object

The options

Type declaration

NameTypeDescription
chunksize?numberThe amount of bytes to read at once. The default value is 1 megabyte
streamIReadableThe data stream to be wrapped by this reader

captureCallback

Ƭ captureCallback: (result: CaptureCallbackResult) => void

Type declaration

▸ (result): void

Callback for capture().

Parameters
Name Type
resultCaptureCallbackResult
Returns

void


findCallback

Ƭ findCallback: (err: Error | string, index?: number) => void

Type declaration

▸ (err, index?): void

Callback for find().

Parameters
Name Type
errError | string
Optional indexnumber
Returns

void


readLinesCallback

Ƭ readLinesCallback: (err: Error | string, index: number, result?: string[], eof?: boolean, progress?: number) => void

Type declaration

▸ (err, index, result?, eof?, progress?): void

Callback for readLines().

Parameters
Name Type
errError | string
indexnumber
Optional resultstring[]
Optional eofboolean
Optional progressnumber
Returns

void