# DataView
An interface for working with a raw binary buffer.
The DataView API is exactly as in JavaScript (MDN (opens new window)).
# Constructor
- Constructs a new DataView on the specified buffer and region.
new DataView(buffer: ArrayBuffer, byteOffset?: i32, byteLength?: i32)
# Instance members
# Fields
readonly buffer: ArrayBufferThe backing buffer.
readonly byteLength: i32The length of this view from the start of its buffer.
readonly byteOffset: i32The offset of this view from the start of its buffer.
# Methods
function getFloat32(byteOffset: i32, littleEndian?: bool): f32Gets the 32-bit float value at the specified offset from the start of the view.
function getFloat64(byteOffset: i32, littleEndian?: bool): f64Gets the 64-bit float value at the specified offset from the start of the view.
function getInt8(byteOffset: i32): i8Gets the signed 8-bit integer value at the specified offset from the start of the view.
function getInt16(byteOffset: i32, littleEndian?: bool): i16Gets the signed 16-bit integer value at the specified offset from the start of the view.
function getInt32(byteOffset: i32, littleEndian?: bool): i32Gets the signed 32-bit integer value at the specified offset from the start of the view.
function getInt64(byteOffset: i32, littleEndian?: bool): i64Gets the signed 64-bit integer value at the specified offset from the start of the view.
function getUint8(byteOffset: i32, littleEndian?: bool): u8Gets the unsigned 8-bit integer value at the specified offset from the start of the view.
function getUint16(byteOffset: i32, littleEndian?: bool): u16Gets the unsigned 16-bit integer value at the specified offset from the start of the view.
function getUint32(byteOffset: i32, littleEndian?: bool): u32Gets the unsigned 32-bit integer value at the specified offset from the start of the view.
function getUint64(byteOffset: i32, littleEndian?: bool): u64Gets the unsigned 64-bit integer value at the specified offset from the start of the view.
function setFloat32(byteOffset: i32, value: f32, littleEndian?: bool): voidSets the 32-bit float value at the specified offset from the start of the view.
function setFloat64(byteOffset: i32, value: f64, littleEndian?: bool): voidSets the 64-bit float value at the specified offset from the start of the view.
function setInt8(byteOffset: i32, value: i8): voidSets the signed 8-bit integer value at the specified offset from the start of the view.
function setInt16(byteOffset: i32, value: i16, littleEndian?: bool): voidSets the signed 16-bit integer value at the specified offset from the start of the view.
function setInt32(byteOffset: i32, value: i32, littleEndian?: bool): voidSets the signed 32-bit integer value at the specified offset from the start of the view.
function setInt64(byteOffset: i32, value: i64, littleEndian?: bool): voidSets the signed 64-bit integer value at the specified offset from the start of the view.
function setUint8(byteOffset: i32, value: u8, littleEndian?: bool): voidSets the unsigned 8-bit integer value at the specified offset from the start of the view.
function setUint16(byteOffset: i32, value: u16, littleEndian?: bool): voidSets the unsigned 16-bit integer value at the specified offset from the start of the view.
function setUint32(byteOffset: i32, value: u32, littleEndian?: bool): voidSets the unsigned 32-bit integer value at the specified offset from the start of the view.
function setUint64(byteOffset: i32, value: u64, littleEndian?: bool): voidSets the unsigned 64-bit integer value at the specified offset from the start of the view.
function toString(): stringReturns a string representation of this object.
Endianness defaults to littleEndian = false.