activemq::io::ByteArrayOutputStream Class Reference

#include <ByteArrayOutputStream.h>

Inheritance diagram for activemq::io::ByteArrayOutputStream:

activemq::io::OutputStream activemq::concurrent::Synchronizable List of all members.

Public Member Functions

 ByteArrayOutputStream (void)
virtual ~ByteArrayOutputStream (void)
virtual const unsigned char * getByteArray (void) const
virtual int getByteArraySize (void) const
virtual void lock () throw ( exceptions::ActiveMQException )
virtual void unlock () throw ( exceptions::ActiveMQException )
virtual void wait () throw ( exceptions::ActiveMQException )
virtual void wait (unsigned long millisecs) throw ( exceptions::ActiveMQException )
virtual void notify () throw ( exceptions::ActiveMQException )
virtual void notifyAll () throw ( exceptions::ActiveMQException )
virtual void write (const unsigned char c) throw ( IOException )
virtual void write (const unsigned char *buffer, const int len) throw ( IOException )
virtual void flush (void) throw ( IOException )
virtual void clear (void) throw ( IOException )
void close (void) throw ( cms::CMSException )

Private Attributes

std::vector< unsigned char > buffer
concurrent::Mutex mutex

Constructor & Destructor Documentation

activemq::io::ByteArrayOutputStream::ByteArrayOutputStream void   )  [inline]
 

Default Constructor

virtual activemq::io::ByteArrayOutputStream::~ByteArrayOutputStream void   )  [inline, virtual]
 

Destructor


Member Function Documentation

void ByteArrayOutputStream::clear void   )  throw ( IOException ) [virtual]
 

Clear current Stream contents

Exceptions:
IOException 

void ByteArrayOutputStream::close void   )  throw ( cms::CMSException )
 

Invokes close on the target output stream.

Exceptions:
CMSException 

void ByteArrayOutputStream::flush void   )  throw ( IOException ) [virtual]
 

Invokes flush on the target output stream, has no affect.

Exceptions:
IOException 

Implements activemq::io::OutputStream.

virtual const unsigned char* activemq::io::ByteArrayOutputStream::getByteArray void   )  const [inline, virtual]
 

Get a snapshot of the data

Returns:
pointer to the data

virtual int activemq::io::ByteArrayOutputStream::getByteArraySize void   )  const [inline, virtual]
 

Get the Size of the Internal Buffer

Returns:
size of the internal buffer

virtual void activemq::io::ByteArrayOutputStream::lock  )  throw ( exceptions::ActiveMQException ) [inline, virtual]
 

Waits on a signal from this object, which is generated by a call to Notify. Must have this object locked before calling.

Exceptions:
ActiveMQException 

Implements activemq::concurrent::Synchronizable.

virtual void activemq::io::ByteArrayOutputStream::notify  )  throw ( exceptions::ActiveMQException ) [inline, virtual]
 

Signals a waiter on this object that it can now wake up and continue. Must have this object locked before calling.

Exceptions:
ActiveMQException 

Implements activemq::concurrent::Synchronizable.

virtual void activemq::io::ByteArrayOutputStream::notifyAll  )  throw ( exceptions::ActiveMQException ) [inline, virtual]
 

Signals the waiters on this object that it can now wake up and continue. Must have this object locked before calling.

Exceptions:
ActiveMQException 

Implements activemq::concurrent::Synchronizable.

virtual void activemq::io::ByteArrayOutputStream::unlock  )  throw ( exceptions::ActiveMQException ) [inline, virtual]
 

Unlocks the object.

Exceptions:
ActiveMQException 

Implements activemq::concurrent::Synchronizable.

virtual void activemq::io::ByteArrayOutputStream::wait unsigned long  millisecs  )  throw ( exceptions::ActiveMQException ) [inline, virtual]
 

Waits on a signal from this object, which is generated by a call to Notify. Must have this object locked before calling. This wait will timeout after the specified time interval.

Parameters:
time in millisecsonds to wait, or WAIT_INIFINITE
Exceptions:
ActiveMQException 

Implements activemq::concurrent::Synchronizable.

virtual void activemq::io::ByteArrayOutputStream::wait  )  throw ( exceptions::ActiveMQException ) [inline, virtual]
 

Waits on a signal from this object, which is generated by a call to Notify. Must have this object locked before calling.

Exceptions:
ActiveMQException 

Implements activemq::concurrent::Synchronizable.

void ByteArrayOutputStream::write const unsigned char *  buffer,
const int  len
throw ( IOException ) [virtual]
 

Writes an array of bytes to the output stream.

Parameters:
buffer The array of bytes to write.
len The number of bytes from the buffer to be written.
Exceptions:
IOException thrown if an error occurs.

Implements activemq::io::OutputStream.

void ByteArrayOutputStream::write const unsigned char  c  )  throw ( IOException ) [virtual]
 

Writes a single byte to the output stream.

Parameters:
c the byte.
Exceptions:
IOException thrown if an error occurs.

Implements activemq::io::OutputStream.


Member Data Documentation

std::vector<unsigned char> activemq::io::ByteArrayOutputStream::buffer [private]
 

The Array of Bytes to read from.

concurrent::Mutex activemq::io::ByteArrayOutputStream::mutex [private]
 

Synchronization object.


The documentation for this class was generated from the following files:
Generated on Thu Aug 3 18:03:33 2006 for activemq-cpp by  doxygen 1.4.5