class PFStream

A stream is sequence of bytes. Small streams (<256K) reside in memory, and large streams are flushed to temporary files. These files are created in a folder specified during initializing the library. If the library is not initialized during creating a stream, the files are created in a temporary folder.

Methods:

tStreamPos seek(tStreamPos offset, int origin);
Moves the stream pointer to a specified location. offset Offset from origin origin FILE_BEGIN, FILE_CURRENT or FILE_END
tStreamSize read(void * buffer, tStreamSize size);
Reads data from a stream and returns the number of bytes actually read. buffer Pointer to data buffer size Size of buffer
tStreamSize write(const void * buffer, tStreamSize size);
Writes data to a stream and returns the number of bytes actually written. buffer Pointer to data buffer size Size of buffer
tStreamPos size();
Returns number of bytes in stream.
tStreamPos copyTo(PFStream * pStream);
Copies stream contents to another stream.
tStreamPos setEndOfStream();
Set the stream end at the current position.
void reset();
Clear the stream contents.

Requirements

Header PFStream.h
Library ProtocolFilters.lib