K. Moon | 832a694 | 2022-10-31 20:11:31 +0000 | [diff] [blame] | 1 | // Copyright 2018 The PDFium Authors |
Dan Sinclair | 048afc6 | 2018-05-01 17:01:54 +0000 | [diff] [blame] | 2 | // Use of this source code is governed by a BSD-style license that can be |
| 3 | // found in the LICENSE file. |
| 4 | |
| 5 | #include "testing/string_write_stream.h" |
Tom Sepez | 25f33d0 | 2021-01-29 01:58:51 +0000 | [diff] [blame] | 6 | |
Dan Sinclair | 048afc6 | 2018-05-01 17:01:54 +0000 | [diff] [blame] | 7 | #include "core/fxcrt/bytestring.h" |
| 8 | #include "core/fxcrt/widestring.h" |
| 9 | |
| 10 | StringWriteStream::StringWriteStream() = default; |
| 11 | |
| 12 | StringWriteStream::~StringWriteStream() = default; |
| 13 | |
Tom Sepez | e1c2bcf | 2022-11-02 19:29:55 +0000 | [diff] [blame] | 14 | bool StringWriteStream::WriteBlock(pdfium::span<const uint8_t> buffer) { |
| 15 | stream_.write(reinterpret_cast<const char*>(buffer.data()), buffer.size()); |
Dan Sinclair | 048afc6 | 2018-05-01 17:01:54 +0000 | [diff] [blame] | 16 | return true; |
| 17 | } |