MCPcopy Create free account
hub / github.com/bcndev/bytecoin / read

Method read

src/common/Streams.cpp:12–20  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

10using namespace common;
11
12void 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
22void IOutputStream::write(const void *data, size_t size) {
23 while (size != 0) {

Callers 1

Words_generate.pyFile · 0.45

Calls 5

StreamErrorClass · 0.85
minFunction · 0.85
readFunction · 0.70
dataMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected