Skip to main content
Module

std/io/bufio.ts>BufWriter#write

Deno standard library
Go to Latest
method BufWriter.prototype.write
import { BufWriter } from "https://deno.land/std@0.105.0/io/bufio.ts";

Writes the contents of data into the buffer. If the contents won't fully fit into the buffer, those bytes that can are copied into the buffer, the buffer is the flushed to the writer and the remaining bytes are copied into the now empty buffer.

Parameters

data: Uint8Array

Returns

Promise<number>

the number of bytes written to the buffer.