An unsafe pointer view to a memory location as specified by the pointer
value. The UnsafePointerView
API follows the standard built in interface
DataView
for accessing the underlying types at an memory
location (numbers, strings and raw bytes).
Constructors Jump to heading
Jump to headingUnsafePointerView(pointer: PointerObject)
Properties Jump to heading
Methods Jump to heading
Jump to headingcopyInto(destination: BufferSource,offset?: number,): void
Copies the memory of the pointer into a typed array.
Length is determined from the typed array's byteLength
.
Also takes optional byte offset from the pointer.
Jump to headinggetArrayBuffer(byteLength: number,offset?: number,): ArrayBuffer
Gets an ArrayBuffer
of length byteLength
at the specified byte
offset from the pointer.
Jump to headinggetBigInt64(offset?: number): bigint
Gets a signed 64-bit integer at the specified byte offset from the pointer.
Jump to headinggetBigUint64(offset?: number): bigint
Gets an unsigned 64-bit integer at the specified byte offset from the pointer.
Jump to headinggetBool(offset?: number): boolean
Gets a boolean at the specified byte offset from the pointer.
Jump to headinggetCString(offset?: number): string
Gets a C string (null
terminated string) at the specified byte offset
from the pointer.
Jump to headinggetFloat32(offset?: number): number
Gets a signed 32-bit float at the specified byte offset from the pointer.
Jump to headinggetFloat64(offset?: number): number
Gets a signed 64-bit float at the specified byte offset from the pointer.
Jump to headinggetInt16(offset?: number): number
Gets a signed 16-bit integer at the specified byte offset from the pointer.
Jump to headinggetInt32(offset?: number): number
Gets a signed 32-bit integer at the specified byte offset from the pointer.
Jump to headinggetInt8(offset?: number): number
Gets a signed 8-bit integer at the specified byte offset from the pointer.
Jump to headinggetPointer<T = unknown>(offset?: number): PointerValue<T>
Gets a pointer at the specified byte offset from the pointer
Jump to headinggetUint16(offset?: number): number
Gets an unsigned 16-bit integer at the specified byte offset from the pointer.
Jump to headinggetUint32(offset?: number): number
Gets an unsigned 32-bit integer at the specified byte offset from the pointer.
Jump to headinggetUint8(offset?: number): number
Gets an unsigned 8-bit integer at the specified byte offset from the pointer.
Static Methods Jump to heading
Jump to headingcopyInto(): void
Copies the memory of the specified pointer into a typed array.
Length is determined from the typed array's byteLength
.
Also takes optional byte offset from the pointer.
Jump to headinggetArrayBuffer(): ArrayBuffer
Gets an ArrayBuffer
of length byteLength
at the specified byte
offset from the specified pointer.
Jump to headinggetCString(pointer: PointerObject,offset?: number,): string
Gets a C string (null
terminated string) at the specified byte offset
from the specified pointer.