diff options
Diffstat (limited to 'core/fpdfapi/edit/cpdf_stringarchivestream.cpp')
-rw-r--r-- | core/fpdfapi/edit/cpdf_stringarchivestream.cpp | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/core/fpdfapi/edit/cpdf_stringarchivestream.cpp b/core/fpdfapi/edit/cpdf_stringarchivestream.cpp new file mode 100644 index 0000000000..328d6a217e --- /dev/null +++ b/core/fpdfapi/edit/cpdf_stringarchivestream.cpp @@ -0,0 +1,35 @@ +// Copyright 2018 PDFium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#include "core/fpdfapi/edit/cpdf_stringarchivestream.h" + +CPDF_StringArchiveStream::CPDF_StringArchiveStream(std::ostringstream* stream) + : stream_(stream) {} + +CPDF_StringArchiveStream::~CPDF_StringArchiveStream() {} + +bool CPDF_StringArchiveStream::WriteByte(uint8_t byte) { + NOTREACHED(); + return false; +} + +bool CPDF_StringArchiveStream::WriteDWord(uint32_t i) { + NOTREACHED(); + return false; +} + +FX_FILESIZE CPDF_StringArchiveStream::CurrentOffset() const { + NOTREACHED(); + return false; +} + +bool CPDF_StringArchiveStream::WriteBlock(const void* pData, size_t size) { + stream_->write(static_cast<const char*>(pData), size); + return true; +} + +bool CPDF_StringArchiveStream::WriteString(const ByteStringView& str) { + stream_->write(str.unterminated_c_str(), str.GetLength()); + return true; +} |