PDF SDK Documentation

Comprehensive Guide for Developers: Features, Integration, and API Reference

Loading...
Searching...
No Matches
read_stream.h
1// Copyright (c) 2009-2025 Avanquest Software. All rights reserved.
2
3#ifndef PDFSDK_CXX_PDF_READ_STREAM_H_INCLUDED_
4#define PDFSDK_CXX_PDF_READ_STREAM_H_INCLUDED_
5
6#include <string>
7#include <vector>
8
10#include <pdfsdk/cxx/bytes.h>
11
12#include "wrapper_base.h"
13
14namespace PDF {
15
19class ReadStream : public detail::RefCountedHandle<PDReadStream> {
20public:
26 size_t ReadInto(std::span<Byte> buffer);
27
32 int ReadChar();
33
34#ifndef SWIG
41 std::string ReadAll();
42#endif // SWIG
43
48 std::vector<Byte> ReadAllBytes();
49
53 void Close();
54
55 PDF_CXX_CORE_WRAPPER_DEFINE_MEMBERS_(ReadStream, PDReadStream)
56};
57
58} // namespace PDF
59
60#include "read_stream_impl.inl"
61
62#endif // PDFSDK_CXX_PDF_READ_STREAM_H_INCLUDED_
size_t ReadInto(std::span< Byte > buffer)
Reads data from the stream into the specified buffer.
std::vector< Byte > ReadAllBytes()
Reads all data from the stream and returns it as a byte buffer.
std::string ReadAll()
Reads all data from the stream and returns it as a string.
void Close()
Closes the read stream.
Objects API.