PDF SDK Documentation

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

Loading...
Searching...
No Matches
PDF::ReadStream Class Reference

Represents a read stream for reading data. More...

#include <pdfsdk/cxx/read_stream.h>

Inheritance diagram for PDF::ReadStream:

Public Member Functions

size_t Read (void *buffer, size_t nbytes)
 Reads data from the stream into the specified buffer.
 
int ReadChar ()
 
std::string ReadAll ()
 Reads all data from the stream and returns it as a string.
 
void Close ()
 Closes the read stream.
 
 ReadStream (PDReadStream handle, bool adopt=false) noexcept
 
 ReadStream (const ReadStream &rhs) noexcept
 
ReadStreamoperator= (const ReadStream &rhs) noexcept
 
 ReadStream (ReadStream &&rhs) noexcept
 
ReadStreamoperator= (ReadStream &&rhs) noexcept
 

Detailed Description

Represents a read stream for reading data.

Member Function Documentation

◆ Read()

size_t PDF::ReadStream::Read ( void * buffer,
size_t nbytes )

Reads data from the stream into the specified buffer.

Parameters
bufferThe buffer to read the data into.
nbytesThe size of the buffer.
Returns
The number of bytes read from the stream.

◆ ReadAll()

std::string PDF::ReadStream::ReadAll ( )
inline

Reads all data from the stream and returns it as a string.

Returns
A string containing all data read from the stream.

◆ ReadChar()

int PDF::ReadStream::ReadChar ( )

Reads a single character from the stream.

Returns
The character read from the stream, or -1 if the end of the stream is reached.

The documentation for this class was generated from the following file: