| 133 | } |
| 134 | |
| 135 | Result<Iterator<std::shared_ptr<Buffer>>> MakeInputStreamIterator( |
| 136 | std::shared_ptr<InputStream> stream, int64_t block_size) { |
| 137 | if (stream->closed()) { |
| 138 | return Status::Invalid("Cannot take iterator on closed stream"); |
| 139 | } |
| 140 | DCHECK_GT(block_size, 0); |
| 141 | return Iterator<std::shared_ptr<Buffer>>(InputStreamBlockIterator(stream, block_size)); |
| 142 | } |
| 143 | |
| 144 | struct RandomAccessFile::Impl { |
| 145 | std::mutex lock_; |