| 75 | } |
| 76 | |
| 77 | Status BufferOutputStream::Close() { |
| 78 | if (is_open_) { |
| 79 | is_open_ = false; |
| 80 | if (position_ < capacity_) { |
| 81 | RETURN_NOT_OK(buffer_->Resize(position_, false)); |
| 82 | } |
| 83 | } |
| 84 | return Status::OK(); |
| 85 | } |
| 86 | |
| 87 | bool BufferOutputStream::closed() const { return !is_open_; } |
| 88 |