public class DataView extends Object
Modifier and Type | Field and Description |
---|---|
ArrayBuffer |
buffer |
double |
byteLength |
double |
byteOffset |
constructor, prototype
Modifier | Constructor and Description |
---|---|
protected |
DataView() |
|
DataView(ArrayBuffer buffer) |
|
DataView(ArrayBuffer buffer,
double byteOffset) |
|
DataView(ArrayBuffer buffer,
double byteOffset,
double byteLength) |
Modifier and Type | Method and Description |
---|---|
String |
$get(Symbol toStringTag) |
double |
getFloat32(double byteOffset,
Boolean littleEndian)
Gets the Float32 value at the specified byte offset from the start of the view.
|
double |
getFloat64(double byteOffset,
Boolean littleEndian)
Gets the Float64 value at the specified byte offset from the start of the view.
|
double |
getInt16(double byteOffset,
Boolean littleEndian)
Gets the Int16 value at the specified byte offset from the start of the view.
|
double |
getInt32(double byteOffset,
Boolean littleEndian)
Gets the Int32 value at the specified byte offset from the start of the view.
|
double |
getInt8(double byteOffset)
Gets the Int8 value at the specified byte offset from the start of the view.
|
double |
getUint16(double byteOffset,
Boolean littleEndian)
Gets the Uint16 value at the specified byte offset from the start of the view.
|
double |
getUint32(double byteOffset,
Boolean littleEndian)
Gets the Uint32 value at the specified byte offset from the start of the view.
|
double |
getUint8(double byteOffset)
Gets the Uint8 value at the specified byte offset from the start of the view.
|
void |
setFloat32(double byteOffset,
double value,
Boolean littleEndian)
Stores an Float32 value at the specified byte offset from the start of the view.
|
void |
setFloat64(double byteOffset,
double value,
Boolean littleEndian)
Stores an Float64 value at the specified byte offset from the start of the view.
|
void |
setInt16(double byteOffset,
double value,
Boolean littleEndian)
Stores an Int16 value at the specified byte offset from the start of the view.
|
void |
setInt32(double byteOffset,
double value,
Boolean littleEndian)
Stores an Int32 value at the specified byte offset from the start of the view.
|
void |
setInt8(double byteOffset,
double value)
Stores an Int8 value at the specified byte offset from the start of the view.
|
void |
setUint16(double byteOffset,
double value,
Boolean littleEndian)
Stores an Uint16 value at the specified byte offset from the start of the view.
|
void |
setUint32(double byteOffset,
double value,
Boolean littleEndian)
Stores an Uint32 value at the specified byte offset from the start of the view.
|
void |
setUint8(double byteOffset,
double value)
Stores an Uint8 value at the specified byte offset from the start of the view.
|
$applyStatic, $applyStatic, $delete, $delete, $get, $get, $set, $set, $super, assign, create, create, defineProperties, defineProperty, defineProperty, freeze, getOwnPropertyDescriptor, getOwnPropertyNames, getPrototypeOf, hasOwnProperty, hasOwnProperty, hasOwnProperty, isExtensible, isFrozen, isPrototypeOf, isSealed, keys, preventExtensions, propertyIsEnumerable, propertyIsEnumerable, propertyIsEnumerable, seal, toJSString, toLocaleString, toString, valueOf
public ArrayBuffer buffer
public double byteLength
public double byteOffset
public DataView(ArrayBuffer buffer, double byteOffset, double byteLength)
public DataView(ArrayBuffer buffer, double byteOffset)
public DataView(ArrayBuffer buffer)
protected DataView()
public double getFloat32(double byteOffset, Boolean littleEndian)
byteOffset
- The place in the buffer at which the value should be retrieved.public double getFloat64(double byteOffset, Boolean littleEndian)
byteOffset
- The place in the buffer at which the value should be retrieved.public double getInt8(double byteOffset)
byteOffset
- The place in the buffer at which the value should be retrieved.public double getInt16(double byteOffset, Boolean littleEndian)
byteOffset
- The place in the buffer at which the value should be retrieved.public double getInt32(double byteOffset, Boolean littleEndian)
byteOffset
- The place in the buffer at which the value should be retrieved.public double getUint8(double byteOffset)
byteOffset
- The place in the buffer at which the value should be retrieved.public double getUint16(double byteOffset, Boolean littleEndian)
byteOffset
- The place in the buffer at which the value should be retrieved.public double getUint32(double byteOffset, Boolean littleEndian)
byteOffset
- The place in the buffer at which the value should be retrieved.public void setFloat32(double byteOffset, double value, Boolean littleEndian)
byteOffset
- The place in the buffer at which the value should be set.value
- The value to set.littleEndian
- If false or undefined, a big-endian value should be written,
otherwise a little-endian value should be written.public void setFloat64(double byteOffset, double value, Boolean littleEndian)
byteOffset
- The place in the buffer at which the value should be set.value
- The value to set.littleEndian
- If false or undefined, a big-endian value should be written,
otherwise a little-endian value should be written.public void setInt8(double byteOffset, double value)
byteOffset
- The place in the buffer at which the value should be set.value
- The value to set.public void setInt16(double byteOffset, double value, Boolean littleEndian)
byteOffset
- The place in the buffer at which the value should be set.value
- The value to set.littleEndian
- If false or undefined, a big-endian value should be written,
otherwise a little-endian value should be written.public void setInt32(double byteOffset, double value, Boolean littleEndian)
byteOffset
- The place in the buffer at which the value should be set.value
- The value to set.littleEndian
- If false or undefined, a big-endian value should be written,
otherwise a little-endian value should be written.public void setUint8(double byteOffset, double value)
byteOffset
- The place in the buffer at which the value should be set.value
- The value to set.public void setUint16(double byteOffset, double value, Boolean littleEndian)
byteOffset
- The place in the buffer at which the value should be set.value
- The value to set.littleEndian
- If false or undefined, a big-endian value should be written,
otherwise a little-endian value should be written.public void setUint32(double byteOffset, double value, Boolean littleEndian)
byteOffset
- The place in the buffer at which the value should be set.value
- The value to set.littleEndian
- If false or undefined, a big-endian value should be written,
otherwise a little-endian value should be written.