ArrayBuffer
Fixed-length byte storage shared by typed views and NIO buffers.
Binary dataType:
typescriptnative.ArrayBufferimport { ArrayBuffer } from "typescriptnative"Type mapping
| TypeScript | JVM | Notes |
|---|---|---|
ArrayBuffer | typescriptnative.ArrayBuffer | One class, imported from the runtime package in TypeScript. |
ArrayBuffer class
declare class ArrayBufferFixed-length storage shared by typed views and NIO. Buffer positions never escape to another owner.
Constructors
new ArrayBuffer(byteLength: int)Static methods
static allocateDirect(byteLength: int): ArrayBufferAllocate off-heap storage. The buffer remains alive while any view references it.
static wrap(source: ByteBuffer): ArrayBufferShare the caller's remaining range. Subsequent changes to its position or limit do not move the view.
Methods
getByteLength(): intisDirect(): booleanasByteBuffer(): ByteBufferslice(): ArrayBufferslice(start: int): ArrayBufferslice(start: int, end: int): ArrayBufferGenerated when the website builds, from ArrayBuffer.java.