()
| 142 | } |
| 143 | |
| 144 | readString() { |
| 145 | const length = this.readShort(); |
| 146 | this.checkOffset(length); |
| 147 | const result = this.buf.toString('utf8', this.offset, this.offset + length); |
| 148 | this.offset += length; |
| 149 | return result; |
| 150 | } |
| 151 | |
| 152 | /** |
| 153 | * Checks that the new length to read is within the range of the buffer length. Throws a RangeError if not. |
no test coverage detected