The getInt32()
method gets a signed 32-bit integer (long) at the specified byte offset from the start of the DataView
.
dataview.getInt32(byteOffset [, littleEndian])
byteOffset
littleEndian
false
or undefined
, a big-endian value is read.A signed 32-bit integer number.
RangeError
byteOffset
is set such as it would read beyond the end of the view.There is no alignment constraint; multi-byte values may be fetched from any offset.
var buffer = new ArrayBuffer(8); var dataview = new DataView(buffer); dataview.getInt32(1); // 0
Specification |
---|
ECMAScript (ECMA-262) The definition of 'DataView.prototype.getInt32' in that specification. |
Desktop | ||||||
---|---|---|---|---|---|---|
getInt32 |
9 | 12 | 15 | 10 | 12.1 | 5.1 |
Mobile | ||||||
---|---|---|---|---|---|---|
getInt32 |
4 | 18 | 15 | 12.1 | 4.2 | 1.0 |
Server | |
---|---|
getInt32 |
0.10 |
© 2005–2018 Mozilla Developer Network and individual contributors.
Licensed under the Creative Commons Attribution-ShareAlike License v2.5 or later.
https://wiki.developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/DataView/getInt32