arraybuffer.md 2.4 KB
Newer Older
1 2
# ArrayBuffer

WOSHIMAHAIFENG's avatar
WOSHIMAHAIFENG 已提交
3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25
ArrayBuffer 对象用来表示通用的原始二进制数据缓冲区。

它是一个字节数组,通常在其他语言中称为“byte array”。你不能直接操作 ArrayBuffer 中的内容;而是要通过类型化数组对象

[Float32Array](https://doc.dcloud.net.cn/uni-app-x/uts/buildin-object-api/float32array.html)

[Float64Array](https://doc.dcloud.net.cn/uni-app-x/uts/buildin-object-api/float64array.html)

[Int8Array](https://doc.dcloud.net.cn/uni-app-x/uts/buildin-object-api/int8array.html)

[Int16Array](https://doc.dcloud.net.cn/uni-app-x/uts/buildin-object-api/int16array.html)

[Int32Array](https://doc.dcloud.net.cn/uni-app-x/uts/buildin-object-api/int32array.html)

[Uint8Array](https://doc.dcloud.net.cn/uni-app-x/uts/buildin-object-api/uint8array.html)

[Uint8ClampedArray](https://doc.dcloud.net.cn/uni-app-x/uts/buildin-object-api/uint8clampedarray.html)

[Uint16Array](https://doc.dcloud.net.cn/uni-app-x/uts/buildin-object-api/uint16array.html)

[Uint32Array](https://doc.dcloud.net.cn/uni-app-x/uts/buildin-object-api/uint32array.html)

[DataView](https://doc.dcloud.net.cn/uni-app-x/uts/buildin-object-api/dataview.html) 对象来操作,它们会将缓冲区中的数据表示为特定的格式,并通过这些格式来读写缓冲区的内容。
26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78


## 构造函数


### Constructor(byteLength)

<!-- UTSJSON.ArrayBuffer.Constructor.description -->

<!-- UTSJSON.ArrayBuffer.Constructor.param -->

<!-- UTSJSON.ArrayBuffer.Constructor.returnValue -->

<!-- UTSJSON.ArrayBuffer.Constructor.compatibility -->

<!-- UTSJSON.ArrayBuffer.Constructor.tutorial -->


## 静态方法


### isView(arg)

<!-- UTSJSON.ArrayBuffer.isView.description -->

<!-- UTSJSON.ArrayBuffer.isView.param -->

<!-- UTSJSON.ArrayBuffer.isView.returnValue -->

<!-- UTSJSON.ArrayBuffer.isView.compatibility -->

<!-- UTSJSON.ArrayBuffer.isView.tutorial -->


## 实例属性


### byteLength

<!-- UTSJSON.ArrayBuffer.byteLength.description -->

<!-- UTSJSON.ArrayBuffer.byteLength.param -->

<!-- UTSJSON.ArrayBuffer.byteLength.returnValue -->

<!-- UTSJSON.ArrayBuffer.byteLength.compatibility -->

<!-- UTSJSON.ArrayBuffer.byteLength.tutorial -->


## 实例方法


WOSHIMAHAIFENG's avatar
WOSHIMAHAIFENG 已提交
79
### slice(begin?, end?)
80 81 82 83 84 85 86 87 88 89 90 91 92

<!-- UTSJSON.ArrayBuffer.slice.description -->

<!-- UTSJSON.ArrayBuffer.slice.param -->

<!-- UTSJSON.ArrayBuffer.slice.returnValue -->

<!-- UTSJSON.ArrayBuffer.slice.test -->

<!-- UTSJSON.ArrayBuffer.slice.compatibility -->

<!-- UTSJSON.ArrayBuffer.slice.tutorial -->