(b: number)
| 132 | } |
| 133 | |
| 134 | public writeUnsignedShort(b: number): void { |
| 135 | this.ensureWriteableSpace(2); |
| 136 | |
| 137 | if ((this.position & 1) == 0) { |
| 138 | const view = new Uint16Array(this.arraybytes); |
| 139 | view[ this.position >> 1 ] = (~~b) & 0xffff; // ~~ is cast to int in js... |
| 140 | } else { |
| 141 | const view = new Uint16Array(this.unalignedarraybytestemp, 0, 1); |
| 142 | view[0] = (~~b) & 0xffff; |
| 143 | const view2 = new Uint8Array(this.arraybytes, this.position, 2); |
| 144 | const view3 = new Uint8Array(this.unalignedarraybytestemp, 0, 2); |
| 145 | view2.set(view3); |
| 146 | } |
| 147 | |
| 148 | this.position += 2; |
| 149 | |
| 150 | if (this.position > this.length) |
| 151 | this.length = this.position; |
| 152 | } |
| 153 | |
| 154 | public readUTFBytes(len: number): string { |
| 155 | let value: string = ''; |
nothing calls this directly
no test coverage detected