| 73 | bool TransformInputStream::closed() const { return impl_->closed_; } |
| 74 | |
| 75 | Result<std::shared_ptr<Buffer>> TransformInputStream::Read(int64_t nbytes) { |
| 76 | RETURN_NOT_OK(impl_->CheckClosed()); |
| 77 | |
| 78 | ARROW_ASSIGN_OR_RAISE(auto buf, AllocateResizableBuffer(nbytes)); |
| 79 | ARROW_ASSIGN_OR_RAISE(auto bytes_read, this->Read(nbytes, buf->mutable_data())); |
| 80 | if (bytes_read < nbytes) { |
| 81 | RETURN_NOT_OK(buf->Resize(bytes_read, /*shrink_to_fit=*/true)); |
| 82 | } |
| 83 | return std::shared_ptr<Buffer>(std::move(buf)); |
| 84 | } |
| 85 | |
| 86 | Result<int64_t> TransformInputStream::Read(int64_t nbytes, void* out) { |
| 87 | RETURN_NOT_OK(impl_->CheckClosed()); |
nothing calls this directly
no test coverage detected