MCPcopy Create free account
hub / github.com/apache/nifi-minifi-cpp / write

Method write

libminifi/test/archive-tests/MergeFileTests.cpp:87–99  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

85
86 template<class Input>
87 int write(Input& input, std::size_t len) {
88 REQUIRE(size_ + len <= capacity_);
89 int total_read = 0;
90 do {
91 auto ret = input.read(end(), gsl::narrow<int>(len));
92 if (ret == 0) break;
93 if (ret < 0) return ret;
94 size_ += ret;
95 len -= ret;
96 total_read += ret;
97 } while (size_ != capacity_);
98 return total_read;
99 }
100 int64_t process(const std::shared_ptr<minifi::io::BaseStream>& stream) {
101 return write(*stream.get(), capacity_);
102 }

Callers 3

writeCompressedMethod · 0.45
read_archivesFunction · 0.45
writeStringFunction · 0.45

Calls 1

readMethod · 0.45

Tested by

no test coverage detected