7#ifndef CORE_FXCRT_CFX_MEMORYSTREAM_H_
8#define CORE_FXCRT_CFX_MEMORYSTREAM_H_
10#include "core/fxcrt/data_vector.h"
11#include "core/fxcrt/fx_stream.h"
12#include "core/fxcrt/retain_ptr.h"
13#include "third_party/base/containers/span.h"
22 bool IsEOF()
override;
28 bool Flush()
override;
30 pdfium::span<
const uint8_t>
GetSpan()
const;
36 DataVector<uint8_t> m_data;
37 size_t m_nCurSize = 0;
FX_FILESIZE GetPosition() override
~CFX_MemoryStream() override
bool ReadBlockAtOffset(pdfium::span< uint8_t > buffer, FX_FILESIZE offset) override
FX_FILESIZE GetSize() override
size_t ReadBlock(pdfium::span< uint8_t > buffer) override
pdfium::span< const uint8_t > GetSpan() const
bool WriteBlockAtOffset(pdfium::span< const uint8_t > buffer, FX_FILESIZE offset) override
ByteString GetNameFor(const ByteString &key) const
bool WriteDictTo(IFX_ArchiveStream *archive, const CPDF_Encryptor *encryptor) const
RetainPtr< const CPDF_Dictionary > GetDict() const
static constexpr uint32_t kInvalidObjNum
RetainPtr< CPDF_Object > CloneObjectNonCyclic(bool bDirect) const
RetainPtr< CPDF_Object > Clone() const override
size_t GetRawSize() const
CPDF_Stream * AsMutableStream() override
bool WriteTo(IFX_ArchiveStream *archive, const CPDF_Encryptor *encryptor) const override
void SetDataFromStringstreamAndRemoveFilter(fxcrt::ostringstream *stream)
Type GetType() const override
void SetDataAndRemoveFilter(pdfium::span< const uint8_t > pData)
void SetDataFromStringstream(fxcrt::ostringstream *stream)
DataVector< uint8_t > ReadAllRawData() const
void SetData(pdfium::span< const uint8_t > pData)
void InitStreamWithEmptyData(RetainPtr< CPDF_Dictionary > pDict)
void InitStreamFromFile(RetainPtr< IFX_SeekableReadStream > pFile, RetainPtr< CPDF_Dictionary > pDict)
pdfium::span< const uint8_t > GetInMemoryRawData() const
RetainPtr< CPDF_Object > CloneNonCyclic(bool bDirect, std::set< const CPDF_Object * > *pVisited) const override
WideString GetUnicodeText() const override
const CPDF_Dictionary * GetDictInternal() const override
bool WriteString(ByteStringView str)
virtual bool WriteBlock(pdfium::span< const uint8_t > data)=0
bool operator==(const char *ptr) const
#define CONSTRUCT_VIA_MAKE_RETAIN