Skip to Content
API reference

ArrayBuffer

Fixed-length byte storage shared by typed views and NIO buffers.

Binary dataType: typescriptnative.ArrayBufferArtifact: com.margelo:typescript-native-stdlib

Type mapping

TypeScriptJVMNotes
ArrayBuffertypescriptnative.ArrayBufferOne class, imported from the runtime package in TypeScript.

ArrayBuffer class

public final class ArrayBuffer

Fixed-length storage shared by typed views and NIO. Buffer positions never escape to another owner.

Constructors

ArrayBuffer(int byteLength)

Static methods

static ArrayBuffer allocateDirect(int byteLength)

Allocate off-heap storage. The buffer remains alive while any view references it.

static ArrayBuffer wrap(ByteBuffer source)

Share the caller's remaining range. Subsequent changes to its position or limit do not move the view.

Methods

int getByteLength()
boolean isDirect()
ByteBuffer asByteBuffer()
ArrayBuffer slice()
ArrayBuffer slice(int start)
ArrayBuffer slice(int start, int end)

Generated when the website builds, from ArrayBuffer.java.

Language

Remembered on every API page

On this page