Method
ReadAll
Source from the content-addressed store, hash-verified
| 168 | } |
| 169 | |
| 170 | Status BufferedInputStream::ReadAll(string* result) { |
| 171 | result->clear(); |
| 172 | Status status; |
| 173 | while (status.ok()) { |
| 174 | status = FillBuffer(); |
| 175 | if (limit_ == 0) { |
| 176 | break; |
| 177 | } |
| 178 | result->append(buf_); |
| 179 | pos_ = limit_; |
| 180 | } |
| 181 | |
| 182 | if (errors::IsOutOfRange(status)) { |
| 183 | file_status_ = status; |
| 184 | return Status::OK(); |
| 185 | } |
| 186 | return status; |
| 187 | } |
| 188 | |
| 189 | Status BufferedInputStream::Reset() { |
| 190 | TF_RETURN_IF_ERROR(input_stream_->Reset()); |