new Pipe()
- Source:
Methods
close()
Close the pipe.
The streams handlers will be unset and the read stream resumed unless it is already ended.
- Source:
endOnComplete(end) → {Pipe}
Set to
true to call WriteStream#end when the source ReadStream completes, false otherwise.
Calling this overwrites Pipe#endOnFailure and Pipe#endOnSuccess.
Parameters:
| Name | Type | Description |
|---|---|---|
end |
boolean | true to end the stream on a source ReadStream completion |
- Source:
Returns:
a reference to this, so the API can be used fluently
- Type
- Pipe
endOnFailure(end) → {Pipe}
Set to
true to call WriteStream#end when the source ReadStream fails, false otherwise.
Parameters:
| Name | Type | Description |
|---|---|---|
end |
boolean | true to end the stream on a source ReadStream failure |
- Source:
Returns:
a reference to this, so the API can be used fluently
- Type
- Pipe
endOnSuccess(end) → {Pipe}
Set to
true to call WriteStream#end when the source ReadStream succeeds, false otherwise.
Parameters:
| Name | Type | Description |
|---|---|---|
end |
boolean | true to end the stream on a source ReadStream success |
- Source:
Returns:
a reference to this, so the API can be used fluently
- Type
- Pipe
to(dst, completionHandler)
Start to pipe the elements to the destination
WriteStream.
When the operation fails with a write error, the source stream is resumed.
Parameters:
| Name | Type | Description |
|---|---|---|
dst |
WriteStream | the destination write stream |
completionHandler |
function | the handler called when the pipe operation completes |
- Source: