SourcePro C++ 12.0 |
SourcePro® C++ API Reference Guide |
SourcePro C++ Documentation Home |
Concrete class implementing the byte array output stream interface. More...
#include <rw/stream/RWChainedByteArrayOutputStreamImp.h>
Public Member Functions | |
virtual | ~RWChainedByteArrayOutputStreamImp () |
virtual RWByte * | getByteArray () |
virtual RWSize | getByteArraySize () const |
virtual void | clear () |
virtual void | close () |
virtual void | flush () |
virtual bool | isBad () const |
virtual bool | isFail () const |
virtual bool | isGood () const |
virtual void | write (RWByte byteValue) |
virtual void | write (const RWByte *byteArray, RWSize numBytes) |
Static Public Member Functions | |
static RWByteArrayOutputStream | make () |
Protected Member Functions | |
RWChainedByteArrayOutputStreamImp () | |
RWChainedMemoryStreambuf & | getSinkBuff () |
const RWChainedMemoryStreambuf & | getSinkBuff () const |
Concrete class implementing the byte array output stream interface. Bytes inserted into an instance of class RWChainedByteArrayOutputStreamImp are stored in memory using an instance of class RWChainedMemoryStreambuf. Implements the body idiom from the handle-body pattern.
virtual RWChainedByteArrayOutputStreamImp::~RWChainedByteArrayOutputStreamImp | ( | ) | [virtual] |
Destructor.
RWChainedByteArrayOutputStreamImp::RWChainedByteArrayOutputStreamImp | ( | ) | [inline, protected] |
Constructor.
virtual void RWChainedByteArrayOutputStreamImp::clear | ( | ) | [virtual] |
Resets the underlying buffer.
Implements RWByteArrayOutputStreamImp.
virtual void RWChainedByteArrayOutputStreamImp::close | ( | ) | [virtual] |
This function calls flush().
Reimplemented from RWOutputStreamImp.
virtual void RWChainedByteArrayOutputStreamImp::flush | ( | ) | [virtual] |
Forward the flush() request to the internal RWChainedMemoryStreambuf object.
Implements RWOutputStreamImp.
virtual RWByte* RWChainedByteArrayOutputStreamImp::getByteArray | ( | ) | [virtual] |
Returns a pointer to an array of bytes containing the bytes inserted into the stream since its creation, or since the last invocation of function getByteArray(), or function clear(). Users are responsible for freeing the memory associated with the array returned by this function, by using operator delete[]
.
Implements RWByteArrayOutputStreamImp.
virtual RWSize RWChainedByteArrayOutputStreamImp::getByteArraySize | ( | ) | const [virtual] |
Returns the size of the byte array that would be returned by a call to function getByteArray().
Implements RWByteArrayOutputStreamImp.
const RWChainedMemoryStreambuf& RWChainedByteArrayOutputStreamImp::getSinkBuff | ( | ) | const [inline, protected] |
Returns a reference to the RWChainedMemoryStreambuf, used as the sink of bytes.
RWChainedMemoryStreambuf& RWChainedByteArrayOutputStreamImp::getSinkBuff | ( | ) | [inline, protected] |
Returns a reference to the RWChainedMemoryStreambuf, used as the sink of bytes.
virtual bool RWChainedByteArrayOutputStreamImp::isBad | ( | ) | const [virtual] |
Returns true
if the last operation performed on the internal RWChainedMemoryStreambuf object failed.
Implements RWStreamImp.
virtual bool RWChainedByteArrayOutputStreamImp::isFail | ( | ) | const [virtual] |
Returns true
if the last operation performed on the internal RWChainedMemoryStreambuf object failed.
Implements RWStreamImp.
virtual bool RWChainedByteArrayOutputStreamImp::isGood | ( | ) | const [virtual] |
Returns true
if the last operation performed on the internal RWChainedMemoryStreambuf object succeeded.
Implements RWStreamImp.
static RWByteArrayOutputStream RWChainedByteArrayOutputStreamImp::make | ( | void | ) | [inline, static] |
Constructs an RWChainedByteArrayOutputStreamImp instance that uses an instance of class RWChainedMemoryStreambuf to store bytes. The function returns a handle to the implementation class.
virtual void RWChainedByteArrayOutputStreamImp::write | ( | const RWByte * | byteArray, | |
RWSize | numBytes | |||
) | [virtual] |
Writes an array of bytes to the iostreams std::streambuf
. Throws exception RWIncompleteStreamOperation.
byteArray | A pointer to the first element of the array. | |
numBytes | The number of bytes to be written. |
Implements RWByteOutputStreamImp.
virtual void RWChainedByteArrayOutputStreamImp::write | ( | RWByte | byteValue | ) | [virtual] |
Writes a single byte to the iostreams std::streambuf
. Throws exception RWExternalStreamException.
byteValue | The byte to be written. |
Implements RWByteOutputStreamImp.
© 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.