SourcePro® 2024.1 |
SourcePro® API Reference Guide |
Concrete class implementing the byte array output stream interface. More...
#include <rw/stream/RWChainedByteArrayOutputStreamImp.h>
Public Member Functions | |
virtual | ~RWChainedByteArrayOutputStreamImp () |
virtual void | clear () |
virtual void | close () |
virtual void | flush () |
virtual RWByte * | getByteArray () |
virtual RWSize | getByteArraySize () const |
virtual bool | isBad () const |
virtual bool | isFail () const |
virtual bool | isGood () const |
virtual void | write (const RWByte *byteArray, RWSize numBytes) |
virtual void | write (RWByte byteValue) |
Public Member Functions inherited from RWByteArrayOutputStreamImp | |
virtual | ~RWByteArrayOutputStreamImp () |
Public Member Functions inherited from RWByteOutputStreamImp | |
virtual | ~RWByteOutputStreamImp () |
virtual RWByteOutputStream | acquire () |
virtual void | release () |
Public Member Functions inherited from RWOutputStreamImp | |
virtual | ~RWOutputStreamImp () |
Public Member Functions inherited from RWStreamImp | |
virtual | ~RWStreamImp () |
Static Public Member Functions | |
static RWByteArrayOutputStream | make () |
Additional Inherited Members | |
Protected Types inherited from RWTCountingBody< RWMutexLock > | |
typedef RWTLockGuard< RWTMonitor< RWMutexLock > > | LockGuard |
typedef RWTTryLockGuard< RWTMonitor< RWMutexLock > > | TryLockGuard |
typedef RWTUnlockGuard< RWTMonitor< RWMutexLock > > | UnlockGuard |
Protected Types inherited from RWTMonitor< RWMutexLock > | |
typedef RWTLockGuard< RWTMonitor< RWMutexLock > > | LockGuard |
typedef RWTTryLockGuard< RWTMonitor< RWMutexLock > > | TryLockGuard |
typedef RWTUnlockGuard< RWTMonitor< RWMutexLock > > | UnlockGuard |
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 |
Destructor.
|
inlineprotected |
Constructor.
|
virtual |
Resets the underlying buffer.
Implements RWByteArrayOutputStreamImp.
|
virtual |
This function calls flush().
Reimplemented from RWOutputStreamImp.
|
virtual |
Forward the flush() request to the internal RWChainedMemoryStreambuf object.
Implements RWOutputStreamImp.
|
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 |
Returns the size of the byte array that would be returned by a call to function getByteArray().
Implements RWByteArrayOutputStreamImp.
|
inlineprotected |
Returns a reference to the RWChainedMemoryStreambuf, used as the sink of bytes.
|
inlineprotected |
Returns a reference to the RWChainedMemoryStreambuf, used as the sink of bytes.
|
virtual |
Returns true
if the last operation performed on the internal RWChainedMemoryStreambuf object failed.
Implements RWStreamImp.
|
virtual |
Returns true
if the last operation performed on the internal RWChainedMemoryStreambuf object failed.
Implements RWStreamImp.
|
virtual |
Returns true
if the last operation performed on the internal RWChainedMemoryStreambuf object succeeded.
Implements RWStreamImp.
|
inlinestatic |
Constructs an RWChainedByteArrayOutputStreamImp instance that uses an instance of class RWChainedMemoryStreambuf to store bytes. The function returns a handle to the implementation class.
|
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 |
Writes a single byte to the iostreams std::streambuf
. Throws exception RWExternalStreamException.
byteValue | The byte to be written. |
Implements RWByteOutputStreamImp.
Copyright © 2024 Rogue Wave Software, Inc., a Perforce company. All Rights Reserved. |