21 std::unique_ptr<utl::TempFileNamed>
mpFile;
23 std::shared_ptr<std::vector<sal_uInt8>>
mpData;
30 auto pData = std::make_shared<std::vector<sal_uInt8>>(
size);
41 auto pStream =
mpFile->GetStream(StreamMode::READ);
43 readData(*pStream, pStream->remainingSize());
47 "Inconsistent system - failed to swap image back in");
48 SAL_DEBUG(
"Swap in: " << pStream->GetError());
64 auto pStream =
mpFile->GetStream(StreamMode::READWRITE);
92 return css::uno::Sequence<sal_Int8>();
110 std::shared_ptr<std::vector<sal_uInt8>> mpData;
113 ReferencedMemoryStream(
const std::shared_ptr<std::vector<sal_uInt8>>& pData)
122 std::shared_ptr<std::vector<sal_uInt8>> mpData;
125 ReferencedXInputStream(
const std::shared_ptr<std::vector<sal_uInt8>>& pData)
137 return std::make_shared<ReferencedMemoryStream>(
mpImpl->mpData);
143 return new ReferencedXInputStream(
mpImpl->mpData);
178 mpImpl->ensureSwappedIn();
std::size_t getSizeBytes() const
return the in-memory size in bytes as of now.
void ensureSwappedIn() const
css::uno::Sequence< sal_Int8 > getCopyAsByteSequence() const
BinaryDataContainer()=default
css::uno::Reference< css::io::XInputStream > getAsXInputStream()
std::shared_ptr< Impl > mpImpl
std::size_t writeToStream(SvStream &rStream) const
writes the contents to the given stream
size_t calculateHash() const
void swapOut() const
swap out to disk for now
std::shared_ptr< SvStream > getAsStream()
const sal_uInt8 * getData() const
std::size_t WriteBytes(const void *pData, std::size_t nSize)
Reference< XOutputStream > stream
#define SAL_WARN_IF(condition, area, stream)
#define SAL_DEBUG(stream)
std::unique_ptr< sal_Int32[]> pData
constexpr OUStringLiteral aData
std::enable_if_t<(sizeof(N)==4)> hash_combine(N &nSeed, T const *pValue, size_t nCount)
void ensureSwappedIn()
ensure the data is in-RAM
std::unique_ptr< utl::TempFileNamed > mpFile
void readData(SvStream &stream, size_t size)
Populate mpData from the stream.
std::shared_ptr< std::vector< sal_uInt8 > > mpData
Impl(SvStream &stream, size_t size)