multiformats - v13.3.6
    Preparing search index...

    Interface ArrayBufferView<Data>

    Similar to ByteView but extends ArrayBuffer.

    interface ArrayBufferView<Data> {
        "[Marker]"?: Data;
        "[toStringTag]": string;
        byteLength: number;
        get detached(): boolean;
        get maxByteLength(): number;
        get resizable(): boolean;
        resize(newByteLength?: number): void;
        slice(begin?: number, end?: number): ArrayBuffer;
        transfer(newByteLength?: number): ArrayBuffer;
        transferToFixedLength(newByteLength?: number): ArrayBuffer;
    }

    Type Parameters

    • Data

    Hierarchy (View Summary)

    Index

    Properties

    "[Marker]"?: Data
    "[toStringTag]": string
    byteLength: number

    Read-only. The length of the ArrayBuffer (in bytes).

    Accessors

    • get detached(): boolean

      Returns a boolean indicating whether or not this buffer has been detached (transferred).

      MDN

      Returns boolean

    • get maxByteLength(): number

      If this ArrayBuffer is resizable, returns the maximum byte length given during construction; returns the byte length if not.

      MDN

      Returns number

    • get resizable(): boolean

      Returns true if this ArrayBuffer can be resized.

      MDN

      Returns boolean

    Methods

    • Resizes the ArrayBuffer to the specified size (in bytes).

      MDN

      Parameters

      • OptionalnewByteLength: number

      Returns void

    • Returns a section of an ArrayBuffer.

      Parameters

      • Optionalbegin: number
      • Optionalend: number

      Returns ArrayBuffer

    • Creates a new ArrayBuffer with the same byte content as this buffer, then detaches this buffer.

      MDN

      Parameters

      • OptionalnewByteLength: number

      Returns ArrayBuffer

    • Creates a new non-resizable ArrayBuffer with the same byte content as this buffer, then detaches this buffer.

      MDN

      Parameters

      • OptionalnewByteLength: number

      Returns ArrayBuffer