SourcePro C++ 12.0 |
SourcePro® C++ API Reference Guide |
SourcePro C++ Documentation Home |
Handle class for all binary input stream implementation classes. More...
#include <rw/stream/RWByteInputStream.h>
Public Member Functions | |
RWByteInputStream (RWByteInputStreamImp *ptr) | |
RWByteInputStream (const RWByteInputStream &handle) | |
RWByteInputStream & | operator= (const RWByteInputStream &handle) |
RWByteInputStream & | operator>> (RWByteInputStream &(*pf)(RWByteInputStream &)) |
RWByteInputStream | operator>> (RWByteInputStream(*pf)(RWByteInputStream &)) |
RWByteInputStream & | operator>> (RWByte &byteValue) |
RWByte | read () |
RWSize | read (RWByte *byteArray, RWSize numBytes) |
RWSize | readUntil (RWByte *byteArray, RWSize maxSize, RWByte delim) |
void | close () |
bool | isBad () const |
bool | isFail () const |
bool | isGood () const |
bool | isEof () const |
RWSize | available () const |
RWSize | skip (RWSize numUnits) |
Related Functions | |
(Note that these are not member functions.) | |
RWByteInputStream & | rwDisc (RWByteInputStream &stream) |
Handle class for all the binary input stream implementation classes. Implement the handle idiom from the handle-body pattern.
RWByteInputStream::RWByteInputStream | ( | RWByteInputStreamImp * | ptr | ) | [inline, explicit] |
Constructor.
RWByteInputStream::RWByteInputStream | ( | const RWByteInputStream & | handle | ) | [inline] |
Copy constructor. Throws no exceptions.
handle | A binary stream handle used to initialize the newly created handle. |
RWSize RWByteInputStream::available | ( | ) | const [inline] |
Returns the number of bytes that can be read from the stream without blocking.
void RWByteInputStream::close | ( | ) | [inline] |
Closes the stream.
bool RWByteInputStream::isBad | ( | ) | const [inline] |
Returns true
to indicate a loss of integrity resulting from an input or output operation, such as an irrecoverable read error from a file.
bool RWByteInputStream::isEof | ( | ) | const [inline] |
Returns true
to indicate that an input operation reached the end of an input sequence.
bool RWByteInputStream::isFail | ( | ) | const [inline] |
Returns true
to indicate that an input operation failed to read the expected data.
bool RWByteInputStream::isGood | ( | ) | const [inline] |
Returns true
to indicate a stream in a valid state.
RWByteInputStream& RWByteInputStream::operator= | ( | const RWByteInputStream & | handle | ) | [inline] |
Assignment operator. Throws no exceptions.
handle | A binary stream handle used to initialize this handle. |
RWByteInputStream& RWByteInputStream::operator>> | ( | RWByte & | byteValue | ) | [inline] |
Reads a single byte from the stream.
byteValue | The byte to be read from the stream. |
RWByteInputStream RWByteInputStream::operator>> | ( | RWByteInputStream(*)(RWByteInputStream &) | pf | ) | [inline] |
Extractor executing a manipulator function.
pf | The manipulator's function pointer. |
RWByteInputStream& RWByteInputStream::operator>> | ( | RWByteInputStream &(*)(RWByteInputStream &) | pf | ) | [inline] |
Extractor executing a manipulator function.
pf | The manipulator's function pointer. |
Reads an array of bytes from the stream. The array must be pre-allocated to contain at least numBytes elements. The function returns the actual number of bytes extracted from the stream.
byteArray | A pointer to the first element of the array. | |
numBytes | The number of bytes to be read from the stream. |
RWByte RWByteInputStream::read | ( | ) | [inline] |
Reads a single byte from the stream.
Reads bytes from the stream until the last byte read is equal to delim, or maxSize bytes have been read, or the end of the input sequence is reached. The bytes read are stored in byteArray. The function returns the actual number of bytes read from the stream.
byteArray | A pointer to the array receiving the bytes extracted from the stream. | |
maxSize | The maximum number of bytes to be read. | |
delim | The byte value used as a delimiter. |
Skips numUnits bytes from the input sequence if possible. The function returns the actual number of bytes skipped, which can be any value between 0 and numUnits.
numUnits | The number of bytes to be skipped. |
RWByteInputStream & rwDisc | ( | RWByteInputStream & | stream | ) | [related] |
Manipulator that discards a byte from a stream input sequence.
stream | The binary stream. |
© Copyright Rogue Wave Software, Inc. All Rights Reserved.
Rogue Wave and SourcePro are registered trademarks of Rogue Wave Software, Inc. in the United States and other countries. All other trademarks are the property of their respective owners.
Contact Rogue Wave about documentation or support issues.