@Generated(value="org.realityforge.webtack")
@JsType(isNative=true,
namespace="<global>",
name="ArrayBuffer")
public class ArrayBuffer
extends JsObject
implements BufferSource, Transferable
It is an array of bytes, often referred to in other languages as a "byte array". You cannot
directly manipulate the contents of an ArrayBuffer; instead, you create one of the typed array
objects or a DataView object which represents the buffer in a specific format, and use
that to read and write the contents of the buffer.
The ArrayBuffer() constructor creates a new ArrayBuffer of the given length in bytes. You can also get an array buffer from existing data, for example from a Base64 string or from a local file.
| Constructor and Description |
|---|
ArrayBuffer(int length)
The ArrayBuffer() constructor is used to create ArrayBuffer objects.
|
| Modifier and Type | Method and Description |
|---|---|
int |
byteLength()
The byteLength accessor property represents the length of an ArrayBuffer in bytes.
|
static boolean |
isView(java.lang.Object value)
The ArrayBuffer.isView() method determines whether the passed value is one of the ArrayBuffer views, such as typed array objects or a DataView.
|
@JsNonNull ArrayBuffer |
slice(int begin)
The slice() method returns a new ArrayBuffer whose contents are a copy of this ArrayBuffer's bytes from begin, inclusive, up to end, exclusive.
|
@JsNonNull ArrayBuffer |
slice(int begin,
int end)
The slice() method returns a new ArrayBuffer whose contents are a copy of this ArrayBuffer's bytes from begin, inclusive, up to end, exclusive.
|
assign, create, create, defineProperties, defineProperty, defineProperty, entries, freeze, fromEntries, getOwnPropertyDescriptor, getOwnPropertyDescriptor, getOwnPropertyDescriptors, getOwnPropertyNames, getOwnPropertySymbols, getPrototypeOf, hasOwnProperty, hasOwnProperty, is, isExtensible, isFrozen, isPrototypeOf, isSealed, keys, preventExtensions, propertyIsEnumerable, seal, setPrototypeOf, toString_, valueOf_, valuespublic ArrayBuffer(int length)
@JsProperty(name="byteLength") public int byteLength()
public static boolean isView(@Nullable
java.lang.Object value)
public @JsNonNull ArrayBuffer slice(int begin, int end)
public @JsNonNull ArrayBuffer slice(int begin)