| 274 | bool closed() const override { return closed_; } |
| 275 | |
| 276 | Result<int64_t> DoRead(int64_t nbytes, void* out) { |
| 277 | RETURN_NOT_OK(CheckOpen()); |
| 278 | int64_t bytes_to_read = std::min(nbytes, nbytes_ - position_); |
| 279 | ARROW_ASSIGN_OR_RAISE(int64_t bytes_read, |
| 280 | file_->ReadAt(file_offset_ + position_, bytes_to_read, out)); |
| 281 | position_ += bytes_read; |
| 282 | return bytes_read; |
| 283 | } |
| 284 | |
| 285 | Result<std::shared_ptr<Buffer>> DoRead(int64_t nbytes) { |
| 286 | RETURN_NOT_OK(CheckOpen()); |