| 62 | size_t WrittenBytes() const { return dest_.contents_.size(); } |
| 63 | |
| 64 | std::string Read() { |
| 65 | if (!reading_) { |
| 66 | reading_ = true; |
| 67 | source_.contents_ = Slice(dest_.contents_); |
| 68 | } |
| 69 | std::string scratch; |
| 70 | Slice record; |
| 71 | if (reader_->ReadRecord(&record, &scratch)) { |
| 72 | return record.ToString(); |
| 73 | } else { |
| 74 | return "EOF"; |
| 75 | } |
| 76 | } |
| 77 | |
| 78 | void IncrementByte(int offset, int delta) { |
| 79 | dest_.contents_[offset] += delta; |
no test coverage detected