(handle, buf, off, len, position, cb)
| 400 | ); |
| 401 | } |
| 402 | read(handle, buf, off, len, position, cb) { |
| 403 | if (this.server) |
| 404 | throw new Error('Client-only method called in server mode'); |
| 405 | if (!Buffer.isBuffer(handle)) |
| 406 | throw new Error('handle is not a Buffer'); |
| 407 | if (!Buffer.isBuffer(buf)) |
| 408 | throw new Error('buffer is not a Buffer'); |
| 409 | if (off >= buf.length) |
| 410 | throw new Error('offset is out of bounds'); |
| 411 | if (off + len > buf.length) |
| 412 | throw new Error('length extends beyond buffer'); |
| 413 | if (position === null) |
| 414 | throw new Error('null position currently unsupported'); |
| 415 | |
| 416 | read_(this, handle, buf, off, len, position, cb); |
| 417 | } |
| 418 | readData(handle, buf, off, len, position, cb) { |
| 419 | // Backwards compatibility |
| 420 | this.read(handle, buf, off, len, position, cb); |
no test coverage detected