ArrayBuffer
Fixed-length byte storage shared by typed views and NIO buffers.
Binary dataType:
typescriptnative.ArrayBufferArtifact: com.margelo:typescript-native-stdlibType mapping
| TypeScript | JVM | Notes |
|---|---|---|
ArrayBuffer | typescriptnative.ArrayBuffer | One class, imported from the runtime package in TypeScript. |
ArrayBuffer class
public final class ArrayBufferFixed-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.