PIP 5.6.1
Platform-Independent Primitives
Public Member Functions | List of all members
PIIOBinaryStream Class Reference

PIBinaryStream adapter over a PIIODevice. More...

#include <piiostream.h>

Inheritance diagram for PIIOBinaryStream:
Inheritance graph
[legend]

Public Member Functions

 PIIOBinaryStream (PIIODevice *device=nullptr)
 Constructs a stream bound to "device".
 
void setDevice (PIIODevice *device)
 Rebinds the stream to "device" and resets read-error state.
 
bool binaryStreamAppendImp (const void *d, size_t s)
 Appends raw bytes through the bound device.
 
bool binaryStreamTakeImp (void *d, size_t s)
 Reads raw bytes from the bound device.
 
ssize_t binaryStreamSizeImp () const
 Returns the number of bytes currently available in the device.
 
- Public Member Functions inherited from PIBinaryStream< PIIOBinaryStream >
bool binaryStreamAppend (const void *d, size_t s)
 Writes raw bytes to the underlying stream.
 
void binaryStreamAppend (T v)
 Writes one trivially copied value as raw bytes.
 
bool binaryStreamTake (void *d, size_t s)
 Reads raw bytes from the underlying stream and sets read error state on short reads.
 
ssize_t binaryStreamSize () const
 Returns remaining readable byte count. More...
 
int binaryStreamTakeInt ()
 Reads one int value from the stream.
 
bool wasReadError () const
 Returns whether there has been an incomplete read since last resetReadError() or after the stream was created.
 
void resetReadError ()
 Reset incomplete read flag.
 

Additional Inherited Members

Detailed Description

PIBinaryStream adapter over a PIIODevice.

Provides binary stream operations for PIIODevice-based devices. See Input/Output stream for the generic stream API.