(length?: number)
| 221 | } |
| 222 | |
| 223 | public readBytes(length?: number): ByteArray { |
| 224 | const len = length || this.length - this._position; |
| 225 | if (this._position > this.length - len) throw new Error(ErrorMessage.PAGDecodeError); |
| 226 | const newBuffer = this.dataView.buffer.slice(this._position, this._position + len); |
| 227 | this._position += len; |
| 228 | this.positonChanged(); |
| 229 | return new ByteArray(newBuffer, this.littleEndian); |
| 230 | } |
| 231 | |
| 232 | public readUBits(numBits: number): number { |
| 233 | const bitMasks: number[] = [0, 1, 3, 7, 15, 31, 63, 127, 255]; |
no test coverage detected