new ReadableStream(stream [, close])
Wraps a readable stream from NodeJS into a IReadableStream
Parameters:
Name | Type | Argument | Description |
---|---|---|---|
stream |
Object | NodeJS stream object |
|
close |
function |
<optional> |
Close handler |
- Since:
-
- 0.1.9
- Implements:
Extends
Methods
-
close()
-
Close the stream
- Since:
-
- 0.1.9
- Inherited From:
Returns:
Resolved when closed
- Type
- Promise
-
read(output)
-
Read all data from the underlying source. Chunk of data is passed to the gpf.interfaces.IWritableStream.
Parameters:
Name Type Description output
gpf.interfaces.IWritableStream Stream that receives chunk of data
- Since:
-
- 0.1.9
- Implements:
Returns:
Resolved when the stream has ended
- Type
- Promise