@Generated(value="org.realityforge.webtack")
@JsType(isNative=true,
namespace="<global>",
name="Uint8Array")
public class Uint8Array
extends java.lang.Object
implements IntegerTypedArray, JsIterable<Uint8Array.Entry>
| Modifier and Type | Class and Description |
|---|---|
static class |
Uint8Array.Entry |
static interface |
Uint8Array.ForEachCallback |
static interface |
Uint8Array.ForEachCallback2 |
static interface |
Uint8Array.ForEachCallback3 |
| Modifier and Type | Field and Description |
|---|---|
static int |
BYTES_PER_ELEMENT
The BYTES_PER_ELEMENT property represents the size in bytes of each element in an typed array.
|
static java.lang.String |
name
The name property represents a string value of the typed array constructor name.
|
| Constructor and Description |
|---|
Uint8Array(ArrayBuffer buffer)
The Uint8Array() constructor creates a typed array of 8-bit unsigned integers.
|
Uint8Array(ArrayBuffer buffer,
int byteOffset)
The Uint8Array() constructor creates a typed array of 8-bit unsigned integers.
|
Uint8Array(ArrayBuffer buffer,
int byteOffset,
int length)
The Uint8Array() constructor creates a typed array of 8-bit unsigned integers.
|
Uint8Array(double[] array)
The Uint8Array() constructor creates a typed array of 8-bit unsigned integers.
|
Uint8Array(int length)
The Uint8Array() constructor creates a typed array of 8-bit unsigned integers.
|
Uint8Array(JsArray<java.lang.Double> array)
The Uint8Array() constructor creates a typed array of 8-bit unsigned integers.
|
Uint8Array(Uint8Array array)
The Uint8Array() constructor creates a typed array of 8-bit unsigned integers.
|
| Modifier and Type | Method and Description |
|---|---|
ArrayBuffer |
buffer()
The buffer accessor property represents the ArrayBuffer referenced by the ArrayBufferView at construction time.
|
int |
byteLength()
The byteLength accessor property represents the length (in bytes) of a ArrayBufferView.
|
int |
byteOffset()
The byteOffset accessor property represents the offset (in bytes) of a ArrayBufferView from the start of its ArrayBuffer.
|
@JsNonNull Uint8Array |
copyWithin(int target,
int start)
The copyWithin() method shallow copies part of an array to another location in the same array and returns it without modifying its length.
|
@JsNonNull Uint8Array |
copyWithin(int target,
int start,
int end)
The copyWithin() method shallow copies part of an array to another location in the same array and returns it without modifying its length.
|
@JsNonNull JsIterator<Uint8Array.Entry> |
entries()
The entries() method returns a new Array iterator object that contains the key/value pairs for each index in the array.
|
@JsNonNull Uint8Array |
fill(short value)
The fill() method fills all the elements of a typed array from a start index to an end index with a static value.
|
@JsNonNull Uint8Array |
fill(short value,
int start)
The fill() method fills all the elements of a typed array from a start index to an end index with a static value.
|
@JsNonNull Uint8Array |
fill(short value,
int start,
int end)
The fill() method fills all the elements of a typed array from a start index to an end index with a static value.
|
void |
forEach(@JsNonNull Uint8Array.ForEachCallback callback)
The forEach() method executes a provided function once per array element.
|
void |
forEach(@JsNonNull Uint8Array.ForEachCallback2 callback)
The forEach() method executes a provided function once per array element.
|
void |
forEach(@JsNonNull Uint8Array.ForEachCallback3 callback)
The forEach() method executes a provided function once per array element.
|
short |
getAt(int index) |
boolean |
includes(short searchElement)
The includes() method determines whether a typed array includes a certain element, returning true or false as appropriate.
|
boolean |
includes(short searchElement,
int fromIndex)
The includes() method determines whether a typed array includes a certain element, returning true or false as appropriate.
|
int |
indexOf(short searchElement)
The indexOf() method returns the first index at which a given element can be found in the typed array, or -1 if it is not present.
|
int |
indexOf(short searchElement,
int fromIndex)
The indexOf() method returns the first index at which a given element can be found in the typed array, or -1 if it is not present.
|
@JsNonNull java.lang.String |
join()
The join() method joins all elements of an array into a string.
|
@JsNonNull java.lang.String |
join(java.lang.String separator)
The join() method joins all elements of an array into a string.
|
@JsNonNull JsIterator<java.lang.Double> |
keys()
The keys() method returns a new array iterator object that contains the keys for each index in the array.
|
int |
lastIndexOf(short searchElement)
The lastIndexOf() method returns the last index at which a given element can be found in the typed array, or -1 if it is not present.
|
int |
lastIndexOf(short searchElement,
int fromIndex)
The lastIndexOf() method returns the last index at which a given element can be found in the typed array, or -1 if it is not present.
|
int |
length() |
static @JsNonNull Uint8Array |
of(short... element)
The TypedArray.of() method creates a new typed array from a variable number of arguments.
|
void |
set(double... array)
The set() method stores multiple values in the typed array, reading input values from a specified array.
|
void |
set(double[] array,
int offset)
The set() method stores multiple values in the typed array, reading input values from a specified array.
|
void |
set(JsArray<java.lang.Double> array)
The set() method stores multiple values in the typed array, reading input values from a specified array.
|
void |
set(JsArray<java.lang.Double> array,
int offset)
The set() method stores multiple values in the typed array, reading input values from a specified array.
|
void |
set(Uint8Array array)
The set() method stores multiple values in the typed array, reading input values from a specified array.
|
void |
set(Uint8Array array,
int offset)
The set() method stores multiple values in the typed array, reading input values from a specified array.
|
void |
setAt(int index,
short value) |
@JsNonNull Uint8Array |
subarray(int start,
int end)
The subarray() method returns a new TypedArray on the same ArrayBuffer store and with the same element types as for this TypedArray object.
|
@JsNonNull java.lang.String |
toString_() |
@JsNonNull JsIterator<java.lang.Double> |
values()
The values() method returns a new array iterator object that contains the values for each index in the array.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waititerator@JsOverlay public static final int BYTES_PER_ELEMENT
@JsOverlay public static final java.lang.String name
public Uint8Array(int length)
public Uint8Array(@Nonnull
Uint8Array array)
public Uint8Array(@Nonnull
JsArray<java.lang.Double> array)
public Uint8Array(@Nonnull
double[] array)
public Uint8Array(@Nonnull
ArrayBuffer buffer,
int byteOffset,
int length)
public Uint8Array(@Nonnull
ArrayBuffer buffer,
int byteOffset)
public Uint8Array(@Nonnull
ArrayBuffer buffer)
@JsProperty(name="buffer") @Nonnull public ArrayBuffer buffer()
ArrayBufferViewbuffer in interface ArrayBufferView@JsProperty(name="byteLength") public int byteLength()
ArrayBufferViewbyteLength in interface ArrayBufferView@JsProperty(name="byteOffset") public int byteOffset()
ArrayBufferViewbyteOffset in interface ArrayBufferView@JsProperty(name="length") public int length()
public static @JsNonNull Uint8Array of(short... element)
public @JsNonNull Uint8Array copyWithin(int target, int start, int end)
public @JsNonNull Uint8Array copyWithin(int target, int start)
@JsOverlay public final short getAt(int index)
@JsOverlay
public final void setAt(int index,
short value)
public void set(@Nonnull
Uint8Array array,
int offset)
public void set(@Nonnull
Uint8Array array)
public void set(@Nonnull
JsArray<java.lang.Double> array,
int offset)
public void set(@Nonnull
double[] array,
int offset)
public void set(@Nonnull
JsArray<java.lang.Double> array)
@JsOverlay
public final void set(@Nonnull
double... array)
public @JsNonNull Uint8Array subarray(int start, int end)
public @JsNonNull Uint8Array fill(short value, int start, int end)
public @JsNonNull Uint8Array fill(short value, int start)
public @JsNonNull Uint8Array fill(short value)
public boolean includes(short searchElement,
int fromIndex)
public boolean includes(short searchElement)
public int indexOf(short searchElement,
int fromIndex)
public int indexOf(short searchElement)
public int lastIndexOf(short searchElement,
int fromIndex)
public int lastIndexOf(short searchElement)
public @JsNonNull java.lang.String join(@Nonnull
java.lang.String separator)
public @JsNonNull java.lang.String join()
@JsMethod(name="toString") public @JsNonNull java.lang.String toString_()
public @JsNonNull JsIterator<java.lang.Double> keys()
public @JsNonNull JsIterator<java.lang.Double> values()
public @JsNonNull JsIterator<Uint8Array.Entry> entries()
public void forEach(@JsNonNull Uint8Array.ForEachCallback callback)
public void forEach(@JsNonNull Uint8Array.ForEachCallback2 callback)
public void forEach(@JsNonNull Uint8Array.ForEachCallback3 callback)