()
| 25 | } |
| 26 | |
| 27 | toBuffer() { |
| 28 | // return the current data as a single enclosing buffer |
| 29 | if (!this._buffer) { |
| 30 | this._buffer = Buffer.alloc(this.length); |
| 31 | this._buf.copy(this._buffer, 0, 0, this.length); |
| 32 | } |
| 33 | return this._buffer; |
| 34 | } |
| 35 | |
| 36 | reset(position) { |
| 37 | position = position || 0; |
no test coverage detected