new LineAdapter()
Stream line adapter
- Since:
-
- 0.2.1
- Implements:
Extends
Methods
-
<protected> _appendToReadBuffer(data)
-
Adds data to the read buffer
Parameters:
Name Type Argument Description data
* <repeatable>
Data to write
- Since:
-
- 0.2.3
- Inherited From:
Returns:
Self reference to allow chaining -
<protected> _completeReadBuffer()
-
Ends the read without any error
- Since:
-
- 0.2.3
- Inherited From:
-
<protected> _setReadError(reason)
-
Ends the read with an error
Parameters:
Name Type Description reason
* Rejection reason
- Since:
-
- 0.2.3
- Inherited From:
-
flush()
-
Request buffered data to be flushed. It does not need to wait for subsequent reads.
- Since:
-
- 0.2.1
- Implements:
Returns:
Resolved when ready
- 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.2.3
- Inherited From:
- Implements:
Returns:
Resolved when the stream has ended
- Type
- Promise
-
write(data)
-
Write data to the underlying destination
Parameters:
Name Type Description data
* Data to write
- Since:
-
- 0.2.1
- Implements:
Returns:
Resolved when ready
- Type
- Promise