| 40 | |
| 41 | protected: |
| 42 | std::streamsize xsgetn(char *s, std::streamsize count) override { |
| 43 | read_sizes_.push_back(count); |
| 44 | if (pos_ >= data_.size() || count <= 0) { |
| 45 | return 0; |
| 46 | } |
| 47 | s[0] = static_cast<char>(data_[pos_]); |
| 48 | ++pos_; |
| 49 | return 1; |
| 50 | } |
| 51 | |
| 52 | int_type underflow() override { |
| 53 | if (pos_ >= data_.size()) { |