Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

x/s3si/deps.ts>io.BufReader#readFull

Export your battles from SplatNet to https://stat.ink
Go to Latest
method io.BufReader.prototype.readFull
Re-export
import { io } from "https://deno.land/x/s3si@gui-v0.4.16/deps.ts";
const { BufReader } = io;

reads exactly p.length bytes into p.

If successful, p is returned.

If the end of the underlying stream has been reached, and there are no more bytes available in the buffer, readFull() returns null instead.

An error is thrown if some bytes could be read, but not enough to fill p entirely before the underlying stream reported an error or EOF. Any error thrown will have a partial property that indicates the slice of the buffer that has been successfully filled with data.

Ported from https://golang.org/pkg/io/#ReadFull

Parameters

p: Uint8Array

Returns

Promise<Uint8Array | null>