activemq-cpp-3.6.0
decaf::io::BufferedOutputStream Class Reference

Wrapper around another output stream that buffers output before writing to the target output stream. More...

#include <src/main/decaf/io/BufferedOutputStream.h>

Inheritance diagram for decaf::io::BufferedOutputStream:

Public Member Functions

 BufferedOutputStream (OutputStream *stream, bool own=false)
 Constructor.
 BufferedOutputStream (OutputStream *stream, int bufferSize, bool own=false)
 Constructor.
virtual ~BufferedOutputStream ()
- Public Member Functions inherited from decaf::io::FilterOutputStream
 FilterOutputStream (OutputStream *outputStream, bool own=false)
 Constructor, creates a wrapped output stream.
virtual ~FilterOutputStream ()
virtual void close ()
 Closes this object and deallocates the appropriate resources.The object is generally no longer usable after calling close.
Exceptions
IOExceptionif an error occurs while closing.
The default implementation of this method does nothing.
virtual std::string toString () const
 Output a String representation of this object.The default version of this method just prints the Class Name.
Returns
a string representation of the object.

- Public Member Functions inherited from decaf::io::OutputStream
 OutputStream ()
virtual ~OutputStream ()
virtual void write (unsigned char c)
 Writes a single byte to the output stream.
virtual void write (const unsigned char *buffer, int size)
 Writes an array of bytes to the output stream.
virtual void write (const unsigned char *buffer, int size, int offset, int length)
 Writes an array of bytes to the output stream in order starting at buffer[offset] and proceeding until the number of bytes specified by the length argument are written or an error occurs.
virtual void lock ()
 Locks the object.
virtual bool tryLock ()
 Attempts to Lock the object, if the lock is already held by another thread than this method returns false.
virtual void unlock ()
 Unlocks the object.
virtual void wait ()
 Waits on a signal from this object, which is generated by a call to Notify.
virtual void wait (long long millisecs)
 Waits on a signal from this object, which is generated by a call to Notify.
virtual void wait (long long millisecs, int nanos)
 Waits on a signal from this object, which is generated by a call to Notify.
virtual void notify ()
 Signals a waiter on this object that it can now wake up and continue.
virtual void notifyAll ()
 Signals the waiters on this object that it can now wake up and continue.
- Public Member Functions inherited from decaf::io::Closeable
virtual ~Closeable ()
- Public Member Functions inherited from decaf::io::Flushable
virtual ~Flushable ()
- Public Member Functions inherited from decaf::util::concurrent::Synchronizable
virtual ~Synchronizable ()
virtual void flush ()
 inheritDoc}
virtual void doWriteByte (unsigned char c)
virtual void doWriteArray (const unsigned char *buffer, int size)
virtual void doWriteArrayBounded (const unsigned char *buffer, int size, int offset, int length)

Additional Inherited Members

- Protected Member Functions inherited from decaf::io::FilterOutputStream
virtual bool isClosed () const
- Protected Attributes inherited from decaf::io::FilterOutputStream
OutputStreamoutputStream
bool own
volatile bool closed

Detailed Description

Wrapper around another output stream that buffers output before writing to the target output stream.

Constructor & Destructor Documentation

decaf::io::BufferedOutputStream::BufferedOutputStream ( OutputStream stream,
bool  own = false 
)

Constructor.

Parameters
streamThe target output stream.
ownIndicates if this class owns the stream pointer.
decaf::io::BufferedOutputStream::BufferedOutputStream ( OutputStream stream,
int  bufferSize,
bool  own = false 
)

Constructor.

Parameters
streamThe target output stream.
bufferSizeThe size for the internal buffer.
ownIndicates if this class owns the stream pointer.
Exceptions
IllegalArgumentExceptionif the bufferSize given is negative.
virtual decaf::io::BufferedOutputStream::~BufferedOutputStream ( )
virtual

Member Function Documentation

virtual void decaf::io::BufferedOutputStream::doWriteArray ( const unsigned char *  buffer,
int  size 
)
protectedvirtual

Reimplemented from decaf::io::FilterOutputStream.

virtual void decaf::io::BufferedOutputStream::doWriteArrayBounded ( const unsigned char *  buffer,
int  size,
int  offset,
int  length 
)
protectedvirtual

Reimplemented from decaf::io::FilterOutputStream.

virtual void decaf::io::BufferedOutputStream::doWriteByte ( unsigned char  c)
protectedvirtual

Reimplemented from decaf::io::FilterOutputStream.

virtual void decaf::io::BufferedOutputStream::flush ( )
virtual

inheritDoc}

Reimplemented from decaf::io::FilterOutputStream.


The documentation for this class was generated from the following file: