| 27 | namespace utils { |
| 28 | |
| 29 | int64_t FileOutputCallback::process(const std::shared_ptr<io::BaseStream>& stream) { |
| 30 | if (stream->size() > 0) { |
| 31 | file_stream_.write(reinterpret_cast<char*>(const_cast<uint8_t*>(stream->getBuffer())), stream->size()); |
| 32 | size_ += stream->size(); |
| 33 | } |
| 34 | return size_.load(); |
| 35 | } |
| 36 | |
| 37 | const std::vector<char> FileOutputCallback::to_string() { |
| 38 | std::vector<char> buffer; |