A readable stream.

This interface should be used wherever an object that is readable is expected, regardless of a specific implementation. See Readable for an abstract base class that can be used to implement an IReadable.

Variables

dataSignal:Signal<Bytes>

Emitted whenever a chunk of data is available.

endSignal:Signal<NoData>

Emitted when the stream is finished. No further signals will be emitted by this instance after endSignal is emitted.

errorSignal:Signal<Error>

Emitted for any error that occurs during reading.

pauseSignal:Signal<NoData>

Emitted when this stream is paused.

resumeSignal:Signal<NoData>

Emitted when this stream is resumed.

Methods

pause ():Void

Pauses flow of data.

pipe (target:IWritable):Void

Pipes the data from this stream to target.

resume ():Void

Resumes flow of data. Note that this method is called automatically whenever listeners to either dataSignal or endSignal are added.