JsonLinesStream
OCP App SDK / JsonLinesStream
JsonLinesStream<T>
Superclass of stream file reader with the main
logic involve in processing a file line by line
Type parameters
T
Hierarchy
FileStream
<T
,Options
>.JsonLinesStream
Index
Constructors
Accessors
Methods
Constructors
constructor()
Signature
new JsonLinesStream<T>(streamBuilder: FileReadableStreamBuilder, rowProcessor: FileRowProcessor<T>, options: Options = {}): JsonLinesStream<T>;
Type parameters
T
Parameters
Name | Type |
---|---|
streamBuilder | FileReadableStreamBuilder |
rowProcessor | FileRowProcessor <T > |
options | Options |
Returns
Overrides: FileStream.constructor
Defined in: src/util/JsonLinesStream.ts:55
Accessors
isFinished
Signature
isFinished(): boolean;
Returns
boolean
Inherited from: FileStream.isFinished
Defined in: src/util/FileStream.ts:44
Inherited from: FileStream.isFinished
Defined in: src/util/FileStream.ts:44
Methods
fastforward()
Signature
fastforward(target: string): Promise<null | string>;
Parameters
Name | Type |
---|---|
target | string |
Returns
Promise
<null
| string
>
Inherited from: FileStream.fastforward
Defined in: src/util/FileStream.ts:48
processSome()
Signature
processSome(): Promise<null | string>;
Returns
Promise
<null
| string
>
Inherited from: FileStream.processSome
Defined in: src/util/FileStream.ts:53
fromStream()
Build a JsonLinesStream from an existing ReadableStream.
Signature
Static fromStream<T>(stream: ReadableStream, processor: FileRowProcessor<T>, options: Options = {}): JsonLinesStream<T>;
Type parameters
T
Parameters
Name | Type | Description |
---|---|---|
stream | ReadableStream | source stream for the JsonLines data |
processor | FileRowProcessor <T > | the row processor |
options | Options | options to provide the JsonLinesParser Options |
Returns
Defined in: src/util/JsonLinesStream.ts:25
fromUrl()
Build a JsonLinesStream that reads from a web resource.
Signature
Static fromUrl<T>(url: string, processor: FileRowProcessor<T>, options: Options = {}): JsonLinesStream<T>;
Type parameters
T
Parameters
Name | Type | Description |
---|---|---|
url | string | source url for the JsonLines data |
processor | FileRowProcessor <T > | the row processor |
options | Options | options to provide the JsonLinesParser Options |
Returns
Defined in: src/util/JsonLinesStream.ts:39
Updated 2 months ago