Module: Advanced Tools Package: Streams
RWByteOutputStream RWHandleBase
#include <rw/stream/RWByteOutputStream.h>
Handle class for all the binary output stream implementation classes. Implements the handle idiom from the handle-body pattern.
RW_EXPLICIT RWByteOutputStream(RWByteOutputStreamImp* body);
Constructor.
RWByteOutputStream(const RWByteOutputStream& handle);
Copy constructor.
Parameter List
handle |
A binary stream handle used to initialize the newly created handle. Exception none. |
RWByteOutputStream operator<<(RWByteOutputStream (*pf)(RWByteOutputStream&));
Inserter executing a manipulator function.
Parameter List
pf |
The manipulator's function pointer. |
RWByteOutputStream& operator<<(RWByte byteValue);
Writes a single byte to the stream.
Parameter List
byteValue |
The byte to be written to the stream. |
RWByteOutputStream& operator<<(RWByteOutputStream& (*pf)(RWByteOutputStream&));
Inserter executing a manipulator function.
Parameter List
pf |
The manipulator's function pointer. |
RWByteOutputStream& operator=(const RWByteOutputStream& handle);
Assignment operator.
Parameter List
handle |
A binary stream handle used to initialize this handle. Exception none. |
void close();
Closes the stream.
void flush();
Flushes the stream.
bool isBad() const;
Returns true to indicate a loss of integrity resulting from an output operation.
bool isFail() const;
Returns true to indicate that an output operation failed to generate the desired data.
bool isGood() const;
Returns true to indicate a stream in a valid state.
void write(RWByte byteValue);
Writes a single byte to the stream.
Parameter List
byteValue |
The byte to be written to the stream. |
void write(const RWByte* byteArray, RWSize numBytes);
Writes an array of bytes to the stream.
Parameter List
byteArray |
A pointer to the first element of the array. |
numBytes |
The number of bytes to be written to the stream. |
RWByteOutputStream& rwFlush(RWByteOutputStream& stream);
Manipulator that flushes a binary output stream.
Parameter List
stream |
The binary stream to be flushed. |
© 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.