writeXXX methods

Ingvar Stepanyan edited this page Aug 27, 2013 · 2 revisions

DataView specification setters require byteOffset to be always passed in the first argument, and passing undefined for sequential writes with jDataView may be not very convenient.

So, you can use writeXXX methods instead, which will set values at current position automatically:

  • writeInt8(value)
  • writeUint8(value)
  • writeInt16(value, littleEndian)
  • writeUint16(value, littleEndian)
  • writeInt32(value, littleEndian)
  • writeUint32(value, littleEndian)
  • writeFloat32(value, littleEndian)
  • writeFloat64(value, littleEndian)
  • write...(value, ...) (works for any set... method)