#include <BufferedOutputStream.h>
Inheritance diagram for activemq::io::BufferedOutputStream:
Public Member Functions | |
BufferedOutputStream (OutputStream *stream) | |
BufferedOutputStream (OutputStream *stream, const int bufSize) | |
virtual | ~BufferedOutputStream () |
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 () throw ( IOException ) |
void | close () throw ( cms::CMSException ) |
Private Member Functions | |
void | init (OutputStream *stream, const int bufSize) |
void | emptyBuffer () throw ( IOException ) |
Private Attributes | |
OutputStream * | stream |
unsigned char * | buffer |
int | bufferSize |
int | head |
int | tail |
|
Constructor.
|
|
Constructor
|
|
|
|
Invokes close on the target output stream.
|
|
Writes the contents of the buffer to the output stream. |
|
Invokes flush on the target output stream.
Implements activemq::io::OutputStream. |
|
Initializes the internal structures. |
|
Locks the object.
Implements activemq::concurrent::Synchronizable. |
|
Signals a waiter on this object that it can now wake up and continue. Must have this object locked before calling.
Implements activemq::concurrent::Synchronizable. |
|
Signals the waiters on this object that it can now wake up and continue. Must have this object locked before calling.
Implements activemq::concurrent::Synchronizable. |
|
Unlocks the object.
Implements activemq::concurrent::Synchronizable. |
|
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.
Implements activemq::concurrent::Synchronizable. |
|
Waits on a signal from this object, which is generated by a call to Notify. Must have this object locked before calling.
Implements activemq::concurrent::Synchronizable. |
|
Writes an array of bytes to the output stream.
Implements activemq::io::OutputStream. |
|
Writes a single byte to the output stream.
Implements activemq::io::OutputStream. |
|
The internal buffer. |
|
The size of the internal buffer. |
|
The current head of the buffer. |
|
The target output stream. |
|
The current tail of the buffer. |