IStream Class Reference

#include <Pt/System/IOStream.h>

Input stream for I/O devices.

Inherits BasicIStream< char >.

Public Member Functions

 IStream (std::size_t bufferSize=8192, bool extend=false)
 Construct with buffer size.
 
 IStream (IODevice &device, std::size_t bufferSize=8192, bool extend=false)
 Construct with I/O device.
 
 ~IStream ()
 Destructor.
 
void attach (IODevice &dev)
 Attach to I/O device.
 
BasicStreamBuffer< char > * buffer ()
 Returns the buffer.
 
void detach ()
 Detach from I/O device.
 
IODevicedevice ()
 Returns the I/O device.
 
void discard ()
 Discards the buffer.
 
IOBufferioBuffer ()
 Returns the stream buffer.
 
std::streamsize peeksome (char *buffer, std::streamsize n)
 Peeks bytes in the stream buffer. More...
 
void reset ()
 Discards and detaches.
 
void setBuffer (BasicStreamBuffer< char > *sb)
 Sets the buffer.
 

Member Function Documentation

std::streamsize peeksome ( char *  buffer,
std::streamsize  n 
)
inherited

The number of bytes that can be peeked depends on the current stream buffer get area and maybe less than requested, similar to istream::readsome().