* Move forwards through the stream by the specified number of bytes. * * @param {number} numBytes
(numBytes)
| 259 | * @param {number} numBytes |
| 260 | */ |
| 261 | moveForwardsBy(numBytes) { |
| 262 | const pos = this.position + numBytes; |
| 263 | if (pos < 0 || pos > this.length) |
| 264 | throw new Error("Cannot move to position " + pos + " in stream. Out of bounds."); |
| 265 | this.position = pos; |
| 266 | this.bitPos = 0; |
| 267 | } |
| 268 | |
| 269 | /** |
| 270 | * Move backwards through the stream by the specified number of bytes. |
no outgoing calls
no test coverage detected