* Read custom string with specified length * 读取指定长度的自定义字符串
(len: number)
| 359 | * 读取指定长度的自定义字符串 |
| 360 | */ |
| 361 | public getCustomString(len: number): string { |
| 362 | const bytes = new Uint8Array(this._data.buffer, this._data.byteOffset + this._position, len); |
| 363 | this._position += len; |
| 364 | return new TextDecoder('utf-8').decode(bytes); |
| 365 | } |
| 366 | |
| 367 | /** |
| 368 | * Read sub-buffer |