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

A class for turning a character stream into a byte stream. More...

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

Inheritance diagram for decaf::io::OutputStreamWriter:

Public Member Functions

 OutputStreamWriter (OutputStream *stream, bool own=false)
 Creates a new OutputStreamWriter.
virtual ~OutputStreamWriter ()
virtual void close ()
 Closes this object and deallocates the appropriate resources.
virtual void flush ()
 Flushes this stream by writing any buffered output to the underlying stream.
- Public Member Functions inherited from decaf::io::Writer
 Writer ()
virtual ~Writer ()
virtual void write (char v)
 Writes an single byte char value.
virtual void write (const std::vector< char > &buffer)
 Writes an array of Chars.
virtual void write (const char *buffer, int size)
 Writes a byte array to the output stream.
virtual void write (const char *buffer, int size, int offset, int length)
 Writes a byte array to the output stream.
virtual void write (const std::string &str)
 Writes a string.
virtual void write (const std::string &str, int offset, int length)
 Writes a string.
virtual decaf::lang::Appendableappend (char value)
 Appends the specified character to this Appendable.
virtual decaf::lang::Appendableappend (const decaf::lang::CharSequence *csq)
 Appends the specified character sequence to this Appendable.
virtual decaf::lang::Appendableappend (const decaf::lang::CharSequence *csq, int start, int end)
 Appends a subsequence of the specified character sequence to this Appendable.
- 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::lang::Appendable
virtual ~Appendable ()

Protected Member Functions

virtual void doWriteArrayBounded (const char *buffer, int size, int offset, int length)
 Override this method to customize the functionality of the method write( char* buffer, int size, int offset, int length ).
virtual void checkClosed () const
- Protected Member Functions inherited from decaf::io::Writer
virtual void doWriteChar (char v)
virtual void doWriteVector (const std::vector< char > &buffer)
virtual void doWriteArray (const char *buffer, int size)
virtual void doWriteString (const std::string &str)
virtual void doWriteStringBounded (const std::string &str, int offset, int length)
virtual decaf::lang::AppendabledoAppendChar (char value)
virtual decaf::lang::AppendabledoAppendCharSequence (const decaf::lang::CharSequence *csq)
virtual decaf::lang::AppendabledoAppendCharSequenceStartEnd (const decaf::lang::CharSequence *csq, int start, int end)

Detailed Description

A class for turning a character stream into a byte stream.

See Also
InputStreamReader
Since
1.0

Constructor & Destructor Documentation

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

Creates a new OutputStreamWriter.

Parameters
streamThe OutputStream to wrap. (cannot be NULL).
ownIndicates whether this instance own the given OutputStream. If true then the OutputStream is destroyed when this class is.
Exceptions
NullPointerExceptionif the stream is NULL.
virtual decaf::io::OutputStreamWriter::~OutputStreamWriter ( )
virtual

Member Function Documentation

virtual void decaf::io::OutputStreamWriter::checkClosed ( ) const
protectedvirtual
virtual void decaf::io::OutputStreamWriter::close ( )
virtual

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.

Implements decaf::io::Closeable.

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

Override this method to customize the functionality of the method write( char* buffer, int size, int offset, int length ).

All subclasses must override this method to provide the basic Writer functionality.

Implements decaf::io::Writer.

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

Flushes this stream by writing any buffered output to the underlying stream.

Exceptions
IOExceptionif an I/O error occurs.

Implements decaf::io::Flushable.


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