writable._writev(chunks, callback)

  • chunks <Object[]> 要写入的多个数据块。 每个数据块的格式为{ chunk: ..., encoding: ... }
  • callback <Function> 当全部数据块被处理完成后的回调函数。

该函数不能被应用程序代码直接调用。 该函数应该由子类实现,且只能被内部的 Writable 类的方法调用。

writable._writev() 能够同时处理多个数据块。 如果实现了该方法,调用该方法时会传入当前缓冲在写入队列中的所有数据块。

writable._writev() 方法有下划线前缀,因为它是在定义在类的内部,不应该被用户程序直接调用。

  • chunks <Object[]> The chunks to be written. Each chunk has following format: { chunk: ..., encoding: ... }.
  • callback <Function> A callback function (optionally with an error argument) to be invoked when processing is complete for the supplied chunks.

This function MUST NOT be called by application code directly. It should be implemented by child classes, and called by the internal Writable class methods only.

The writable._writev() method may be implemented in addition to writable._write() in stream implementations that are capable of processing multiple chunks of data at once. If implemented, the method will be called with all chunks of data currently buffered in the write queue.

The writable._writev() method is prefixed with an underscore because it is internal to the class that defines it, and should never be called directly by user programs.