Hi there! Are you looking for the official Deno documentation? Try docs.deno.com for all your Deno learning needs.

Buffer

class Buffer extends Userdata<"fz_buffer"> {
constructor();
constructor(data: string);
constructor(data: ArrayBuffer | Uint8Array);
constructor(pointer: Pointer<"fz_buffer">);
asString(): string;
asUint8Array(): Uint8Array;
getLength(): number;
readByte(at: number): number;
slice(start: number, end: number): Buffer;
write(s: string): void;
writeBuffer(other: AnyBuffer): void;
writeByte(b: number): void;
writeLine(s: string): void;
 
static readonly _drop: (p: Pointer<"fz_buffer">) => void;
}

§Extends

§
Userdata<"fz_buffer">
[src]

§Constructors

§
new Buffer()
[src]

New empty Buffer.

§
new Buffer(data: string)
[src]

New Buffer initialized with string contents as UTF-8.

§
new Buffer(data: ArrayBuffer | Uint8Array)
[src]

New Buffer initialized with typed array contents.

§
new Buffer(pointer: Pointer<"fz_buffer">)
[src]

PRIVATE

§Methods

§
asString(): string
[src]
§
asUint8Array(): Uint8Array
[src]
§
getLength(): number
[src]
§
readByte(at: number): number
[src]
§
slice(start: number, end: number): Buffer
[src]
§
write(s: string): void
[src]
§
writeBuffer(other: AnyBuffer): void
[src]
§
writeByte(b: number): void
[src]
§
writeLine(s: string): void
[src]

§Static Properties

§
_drop: (p: Pointer<"fz_buffer">) => void
[src]