| 60 | } |
| 61 | |
| 62 | Status BufferOutputStream::Reset(int64_t initial_capacity, MemoryPool* pool) { |
| 63 | ARROW_ASSIGN_OR_RAISE(buffer_, AllocateResizableBuffer(initial_capacity, pool)); |
| 64 | is_open_ = true; |
| 65 | capacity_ = initial_capacity; |
| 66 | position_ = 0; |
| 67 | mutable_data_ = buffer_->mutable_data(); |
| 68 | return Status::OK(); |
| 69 | } |
| 70 | |
| 71 | BufferOutputStream::~BufferOutputStream() { |
| 72 | if (buffer_) { |