* Resize the current write buffer * @this {!WriteBuffer} * @param {number} size Write buffer size
(size)
| 307 | * @param {number} size Write buffer size |
| 308 | */ |
| 309 | resize (size) { |
| 310 | this.reserve(size) |
| 311 | this._size = size |
| 312 | if (this._offset > this._size) { |
| 313 | this._offset = this._size |
| 314 | } |
| 315 | } |
| 316 | |
| 317 | /** |
| 318 | * Reset the current write buffer and its offset |