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

std/io/buf_reader.ts>BufReader#read

Deno standard library
Go to Latest
The Standard Library has been moved to JSR. See the blog post for details.
method BufReader.prototype.read
import { BufReader } from "https://deno.land/std@0.205.0/io/buf_reader.ts";

reads data into p. It returns the number of bytes read into p. The bytes are taken from at most one Read on the underlying Reader, hence n may be less than len(p). To read exactly len(p) bytes, use io.ReadFull(b, p).

Parameters

p: Uint8Array

Returns

Promise<number | null>