Skip to Content
API reference

Uint8Array

An unsigned byte view of an ArrayBuffer. Stores truncate and wrap modulo 256.

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

Type mapping

TypeScriptJVMNotes
Uint8Arraytypescriptnative.Uint8ArrayOne class, imported from the runtime package in TypeScript.

Uint8Array class

public final class Uint8Array

Unsigned bytes in shared writable storage. Values written through a view are reduced modulo 256.

Constructors

Uint8Array(int length)
Uint8Array(ArrayBuffer buffer)
Uint8Array(ArrayBuffer buffer, int offset)
Uint8Array(ArrayBuffer buffer, int offset, int length)

Methods

ArrayBuffer getBuffer()
int getByteOffset()
int getByteLength()
int getLength()
int get(int index)
void set(int index, double value)
double assign(int index, double value)

JavaScript assignment evaluates to its original value even when the stored byte wraps.

int update(int index, int delta, boolean postfix)
Uint8Array subarray()
Uint8Array subarray(int start)
Uint8Array subarray(int start, int end)
ByteBuffer asByteBuffer()

Generated when the website builds, from Uint8Array.java.

Language

Remembered on every API page

On this page