JavaScript ArrayBuffer : Object
ArrayBuffers are fixed length buffer of bytes. The bytes in an ArrayBuffer are only accessible through a
DataView
(for heterogenous data) or one of the typed arrays (for homogeneous
data): BigInt64Array
, BigUint64Array
, Float32Array
, Float64Array
, Int8Array
, Int16Array
, Int32Array
, Uint8Array
, Uint8ClampedArray
,
Uint16Array
, Uint32Array
. Multiple
DataView and typed arrays can be applied to one ArrayBuffer and changes to one view can be seen in the others
immediately.
Constructors
Allocates a new ArrayBuffer
of the specified length where each byte starts as 0
.
Example:
RunResults:
Instance Methods
Creates a new ArrayBuffer with a copy of the bytes of this
between beginByte
(inclusive) and endByte
(exclusive). If endByte
is not specified,
this.byteLength
is used. Changes to this
do not affect the copy returned by
slice
.
Example:
RunResults:
Copyright © PUBLIC Contributors