最終更新:2018-01-07 (日) 08:19:30 (165d)  

stream.Readable はてなブックマークを見る
Top / stream.Readable

Readable streams are an abstraction for a source from which data is consumed.

https://nodejs.org/api/stream.html#stream_readable_streams

イベント (readable.on?)

close

data

  • chunk <Buffer> | <string> | <any> The chunk of data. For streams that are not operating in object mode, the chunk will be either a string or Buffer. For streams that are in object mode, the chunk can be any JavaScript value other than null.
    readable.on('data', (chunk) => {
      console.log(`Received ${chunk.length} bytes of data.`);
    });

end

error

readable

関数

  • readable.isPaused?()
  • readable.pause?()
  • readable.pipe(destination[, options])
  • readable.readableHighWaterMark?
  • readable.read?([size])
  • readable.resume?()
  • readable.setEncoding?(encoding)
  • readable.unpipe?([destination])
  • readable.unshift?(chunk)
  • readable.wrap?(stream)
  • readable.destroy?([error])

実装

関連

  • stream.Writable?