| 10 | using namespace common; |
| 11 | |
| 12 | void IInputStream::read(void *data, size_t count) { |
| 13 | while (count != 0) { |
| 14 | size_t rc = read_some(data, count); |
| 15 | if (rc == 0) |
| 16 | throw StreamError("IInputStream reading from empty stream"); |
| 17 | data = reinterpret_cast<char *>(data) + rc; |
| 18 | count -= rc; |
| 19 | } |
| 20 | } |
| 21 | |
| 22 | void IOutputStream::write(const void *data, size_t size) { |
| 23 | while (size != 0) { |
no test coverage detected