getUint16(byteOffset)
getUint16(byteOffset, littleEndian)
Parameters
byteOffset
The offset, in bytes, from the start of the view to read the data from.
littleEndian OptionalIndicates whether the data is stored in little- or big-endian format. If false or undefined, a big-endian value is read.
// 指示数据是以小端还是大端格式存储。如果为false或未定义,则读取一个大端序值。
// 设置
setUint16(byteOffset, value)
setUint16(byteOffset, value, littleEndian)
ParametersbyteOffset
The offset, in bytes, from the start of the view to store the data in.
valueThe value to set. For how the value is encoded in bytes, see Value encoding and normalization.
littleEndian OptionalIndicates whether the data is stored in little- or big-endian format. If false or undefined, a big-endian value is written.
// 指示数据是以小端还是大端格式存储。如果为false或未定义,则会写入一个大端值。