import { BufWriter } from "https://deno.land/std@0.39.0/io/mod.ts";
BufWriter implements buffering for an deno.Writer object. If an error occurs writing to a Writer, no more data will be accepted and all subsequent writes, and flush(), will return the error. After all data has been written, the client should call the flush() method to guarantee all data has been forwarded to the underlying deno.Writer.
Methods
Returns how many bytes are unused in the buffer.
buffered returns the number of bytes that have been written into the current buffer.
Flush writes any buffered data to the underlying io.Writer.
Discards any unflushed buffered data, clears any error, and resets b to write its output to w.
Size returns the size of the underlying buffer in bytes.
Writes the contents of p into the buffer. Returns the number of bytes written.