PoDoFo 1.0.0-dev
|
An interface for reading blocks of data from a data source. More...
#include <InputStream.h>
Public Member Functions | |
void | Read (char *buffer, size_t size) |
Read data from the device. | |
size_t | Read (char *buffer, size_t size, bool &eof) |
Read data from the device. | |
char | ReadChar () |
Get next char from stream. | |
bool | Read (char &ch) |
Get next char from stream. | |
void | CopyTo (OutputStream &stream) |
Copy this stream to another. | |
void | CopyTo (OutputStream &stream, size_t size) |
Copy this stream to another. | |
Protected Member Functions | |
virtual size_t | readBuffer (char *buffer, size_t size, bool &eof)=0 |
Read a buffer from the stream /param eof true if the stream reached eof during read /returns number of read bytes. | |
virtual bool | readChar (char &ch) |
Read the next char in stream. | |
virtual void | checkRead () const |
Optional checks before reading By default does nothing. | |
Static Protected Member Functions | |
static size_t | ReadBuffer (InputStream &stream, char *buffer, size_t size, bool &eof) |
static bool | ReadChar (InputStream &stream, char &ch) |
An interface for reading blocks of data from a data source.
It supports non-blocking read operations
|
protectedvirtual |
Optional checks before reading By default does nothing.
Reimplemented in PoDoFo::InputStreamDevice.
void InputStream::CopyTo | ( | OutputStream & | stream | ) |
Copy this stream to another.
void InputStream::CopyTo | ( | OutputStream & | stream, |
size_t | size | ||
) |
Copy this stream to another.
Get next char from stream.
ch | the read character |
Read data from the device.
buffer | a pointer to the data buffer |
size | length of the output buffer |
Read data from the device.
buffer | a pointer to the data buffer |
size | length of the output buffer |
eof | stream encountered EOF during the read |
|
protectedpure virtual |
Read a buffer from the stream /param eof true if the stream reached eof during read /returns number of read bytes.
Implemented in PoDoFo::NullStreamDevice, and PoDoFo::PdfCanvasInputDevice.
char InputStream::ReadChar | ( | ) |
Get next char from stream.
Read the next char in stream.
/returns true if success, false if EOF
Reimplemented in PoDoFo::NullStreamDevice, and PoDoFo::PdfCanvasInputDevice.