| 327 | } |
| 328 | |
| 329 | void Bytes::writeToFile(const std::string& filename) const |
| 330 | { |
| 331 | std::ofstream f(filename, std::ios::out | std::ios::binary); |
| 332 | if (!f.is_open()) |
| 333 | error("cannot open output file '{}'", filename); |
| 334 | |
| 335 | f.write((const char*)cbegin(), size()); |
| 336 | f.close(); |
| 337 | } |
| 338 | |
| 339 | void Bytes::writeTo(std::ostream& stream) const |
| 340 | { |
no test coverage detected