decaf::io::Writer Class Reference

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

Inheritance diagram for decaf::io::Writer:
Inheritance graph
[legend]

Public Member Functions

 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.

Protected Member Functions

virtual void doWriteArrayBounded (const char *buffer, int size, int offset, int length)=0
 Override this method to customize the functionality of the method write( char* buffer, int size, int offset, int length ).
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)

Constructor & Destructor Documentation

decaf::io::Writer::Writer (  ) 
virtual decaf::io::Writer::~Writer (  )  [virtual]

Member Function Documentation

virtual decaf::lang::Appendable& decaf::io::Writer::append ( const decaf::lang::CharSequence csq,
int  start,
int  end 
) [virtual]

Appends a subsequence of the specified character sequence to this Appendable.

Parameters:
csq - The character sequence from which a subsequence will be appended. If csq is NULL, then characters will be appended as if csq contained the string "null".
start The index of the first character in the subsequence.
end The index of the character following the last character in the subsequence.
Returns:
a Reference to this Appendable
Exceptions:
Exception if an error occurs.
IndexOutOfBoundsException start is greater than end, or end is greater than csq.length()

Implements decaf::lang::Appendable.

virtual decaf::lang::Appendable& decaf::io::Writer::append ( const decaf::lang::CharSequence csq  )  [virtual]

Appends the specified character sequence to this Appendable.

Parameters:
csq The character sequence from which a subsequence will be appended. If csq is NULL, then characters will be appended as if csq contained the string "null".
Returns:
a Reference to this Appendable.
Exceptions:
Exception if an error occurs.

Implements decaf::lang::Appendable.

virtual decaf::lang::Appendable& decaf::io::Writer::append ( char  value  )  [virtual]

Appends the specified character to this Appendable.

Parameters:
value The character to append.
Returns:
a Reference to this Appendable
Exceptions:
Exception if an error occurs.

Implements decaf::lang::Appendable.

virtual decaf::lang::Appendable& decaf::io::Writer::doAppendChar ( char  value  )  [protected, virtual]
virtual decaf::lang::Appendable& decaf::io::Writer::doAppendCharSequence ( const decaf::lang::CharSequence csq  )  [protected, virtual]
virtual decaf::lang::Appendable& decaf::io::Writer::doAppendCharSequenceStartEnd ( const decaf::lang::CharSequence csq,
int  start,
int  end 
) [protected, virtual]
virtual void decaf::io::Writer::doWriteArray ( const char *  buffer,
int  size 
) [protected, virtual]
virtual void decaf::io::Writer::doWriteArrayBounded ( const char *  buffer,
int  size,
int  offset,
int  length 
) [protected, pure virtual]

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.

Implemented in decaf::io::OutputStreamWriter.

virtual void decaf::io::Writer::doWriteChar ( char  v  )  [protected, virtual]
virtual void decaf::io::Writer::doWriteString ( const std::string &  str  )  [protected, virtual]
virtual void decaf::io::Writer::doWriteStringBounded ( const std::string &  str,
int  offset,
int  length 
) [protected, virtual]
virtual void decaf::io::Writer::doWriteVector ( const std::vector< char > &  buffer  )  [protected, virtual]
virtual void decaf::io::Writer::write ( const std::string &  str,
int  offset,
int  length 
) [virtual]

Writes a string.

Parameters:
str The string to be written.
offset The position in the array to start writing from.
length The number of bytes in the array to write.
Exceptions:
IOException thrown if an error occurs.
IndexOutOfBoundsException if offset+length is greater than the string length.
virtual void decaf::io::Writer::write ( const std::string &  str  )  [virtual]

Writes a string.

Parameters:
str The string to be written.
Exceptions:
IOException thrown if an error occurs.
virtual void decaf::io::Writer::write ( const char *  buffer,
int  size,
int  offset,
int  length 
) [virtual]

Writes a byte array to the output stream.

Parameters:
buffer The byte array to write (cannot be NULL).
size The size in bytes of the buffer passed.
offset The position in the array to start writing from.
length The number of bytes in the array to write.
Exceptions:
IOException if an I/O error occurs.
NullPointerException if buffer is NULL.
IndexOutOfBoundsException if offset + length > size of the buffer.
virtual void decaf::io::Writer::write ( const char *  buffer,
int  size 
) [virtual]

Writes a byte array to the output stream.

Parameters:
buffer The byte array to write (cannot be NULL).
size The size in bytes of the buffer passed.
Exceptions:
IOException if an I/O error occurs.
NullPointerException if buffer is NULL.
virtual void decaf::io::Writer::write ( const std::vector< char > &  buffer  )  [virtual]

Writes an array of Chars.

Parameters:
buffer The array to be written.
Exceptions:
IOException thrown if an error occurs.
virtual void decaf::io::Writer::write ( char  v  )  [virtual]

Writes an single byte char value.

Parameters:
v The value to be written.
Exceptions:
IOException thrown if an error occurs.

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

Generated on 1 Dec 2014 for activemq-cpp-3.8.2 by  doxygen 1.6.1