std@0.146.0/io/mod.ts

Deno standard library
Go to Latest
import * as mod from "https://deno.land/std@0.146.0/io/mod.ts";

Buffering and various utilities for working with Deno's Reader and Writer interfaces.

Classes

A variable-sized buffer of bytes with read() and write() methods.

BufReader implements buffering for a Reader object.

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.

BufWriterSync implements buffering for a deno.WriterSync object. If an error occurs writing to a WriterSync, 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.WriterSync.

A LimitedReader reads from reader but limits the amount of data returned to just limit bytes. Each call to read updates limit to reflect the new amount remaining. read returns null when limit <= 0 or when the underlying reader returns null.

Reader utility for combining multiple readers

Reader utility for strings

Writer utility for buffering string chunks

Variables

v
copy 👎 deprecated
v
iterateReader 👎 deprecated
v
iterateReaderSync 👎 deprecated
v
readableStreamFromReader 👎 deprecated
v
readAll 👎 deprecated
v
readAllSync 👎 deprecated
v
readerFromIterable 👎 deprecated
v
readerFromStreamReader 👎 deprecated
v
writableStreamFromWriter 👎 deprecated
v
writeAll 👎 deprecated
v
writeAllSync 👎 deprecated
v
writerFromStreamWriter 👎 deprecated

Functions

Copy N size at the most. If read size is lesser than N, then returns nread

Read delimited bytes from a Reader.

Read big endian 32bit integer from BufReader

Read strings line-by-line from a Reader.

Read big endian 64bit long from BufReader

Read big endian 16bit short from BufReader

Read delimited strings from a Reader.

Slice number into 64bit big endian byte array

Interfaces

Result type returned by of BufReader.readLine().