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