deno.writer
继承关系
被谁实现
索引
Methods
Methods
write
-
write(p: Uint8Array): Promise<number>
-
将
p中的p.byteLength字节写入底层数据流。 它 resolve 时返回值为从p写入的 字节数(0<=n<=p.byteLength),reject 时返回值为导致写入提前停止的错误。 如果将要 resolve 一个n<p.byteLength的值时,write()必须 reject,并且返回 一个非空错误。write()禁止修改分片数据,即使是临时修改。Writes
p.byteLengthbytes frompto the underlying data stream. It resolves to the number of bytes written fromp(0<=n<=p.byteLength) or reject with the error encountered that caused the write to stop early.write()must reject with a non-null error if would resolve ton<p.byteLength.write()must not modify the slice data, even temporarily.实现不应保留对
p的引用。Implementations should not retain a reference to
p.参数
-
p: Uint8Array
返回 Promise<number>
-
图例说明
- Method
本文档使用 TypeDoc 生成。