DataView .prototype 是DataView 对象的原型
writable
false
enumerable
false
configurable
false
描述
DataView 的实例从DataView.prototype 继承。就像所有的构造器,你可以修改原型来改变生成的DataView实例。
属性
DataView.prototype.constructor
Specifies the function that creates an object's prototype. The initial value is the standard built-in DataView constructor.
DataView.prototype.buffer 只读
The ArrayBuffer referenced by this view. Fixed at construction time and thus read only.
DataView.prototype.byteLength 只读
The length (in bytes) of this view from the start of its ArrayBuffer . Fixed at construction time and thus read only.
DataView.prototype.byteOffset 只读
The offset (in bytes) of this view from the start of its ArrayBuffer . Fixed at construction time and thus read only.
方法
读
DataView.prototype.getInt8()
从DataView 起始位置以byte为计数的指定偏移量(byteOffset)处获取一个8-bit数(一个字节).
DataView.prototype.getUint8()
从DataView 起始位置以byte为计数的指定偏移量(byteOffset)处获取一个8-bit数(无符号字节).
DataView.prototype.getInt16()
从DataView 起始位置以byte为计数的指定偏移量(byteOffset)处获取一个16-bit数(短整型).
DataView.prototype.getUint16()
从DataView 起始位置以byte为计数的指定偏移量(byteOffset)处获取一个16-bit数(无符号短整型).
DataView.prototype.getInt32()
从DataView 起始位置以byte为计数的指定偏移量(byteOffset)处获取一个32-bit数(长整型).
DataView.prototype.getUint32()
从DataView 起始位置以byte为计数的指定偏移量(byteOffset)处获取一个32-bit数(无符号长整型).
DataView.prototype.getFloat32()
从DataView 起始位置以byte为计数的指定偏移量(byteOffset)处获取一个32-bit数(浮点型).
DataView.prototype.getFloat64()
从DataView 起始位置以byte为计数的指定偏移量(byteOffset)处获取一个64-bit数(双精度浮点型).
写
DataView.prototype.setInt8()
从DataView 起始位置以byte为计数的指定偏移量(byteOffset)处储存一个8-bit数(一个字节).
DataView.prototype.setUint8()
从DataView 起始位置以byte为计数的指定偏移量(byteOffset)处储存一个8-bit数(无符号字节).
DataView.prototype.setInt16()
从DataView 起始位置以byte为计数的指定偏移量(byteOffset)处储存一个16-bit数(短整型).
DataView.prototype.setUint16()
从DataView 起始位置以byte为计数的指定偏移量(byteOffset)处储存一个16-bit数(无符号短整型).
DataView.prototype.setInt32()
从DataView 起始位置以byte为计数的指定偏移量(byteOffset)处储存一个32-bit数(长整型).
DataView.prototype.setUint32()
从DataView 起始位置以byte为计数的指定偏移量(byteOffset)处储存一个32-bit数(无符号长整型).
DataView.prototype.setFloat32()
从DataView 起始位置以byte为计数的指定偏移量(byteOffset)处储存一个32-bit数(浮点型).
DataView.prototype.setFloat64()
从DataView 起始位置以byte为计数的指定偏移量(byteOffset)处储存一个64-bit数(双精度浮点型).
规范
浏览器支持
Feature
Chrome
Firefox (Gecko)
Internet Explorer
Opera
Safari
Basic support
9.0
15.0 (15.0)
10
12.1
5.1
Feature
Android
Chrome for Android
Firefox Mobile (Gecko)
IE Mobile
Opera Mobile
Safari Mobile
Basic support
4.0
(Yes)
15.0 (15)
?
12.0
4.2
另见
文档标签和贡献者
最后编辑者:
Taoja ,
Oct 10, 2016, 8:06:53 PM