activemq-cpp-3.4.0
|
#include <src/main/decaf/io/Writer.h>
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::Appendable & | append (char value) |
Appends the specified character to this Appendable. | |
virtual decaf::lang::Appendable & | append (const decaf::lang::CharSequence *csq) |
Appends the specified character sequence to this Appendable. | |
virtual decaf::lang::Appendable & | append (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::Appendable & | doAppendChar (char value) |
virtual decaf::lang::Appendable & | doAppendCharSequence (const decaf::lang::CharSequence *csq) |
virtual decaf::lang::Appendable & | doAppendCharSequenceStartEnd (const decaf::lang::CharSequence *csq, int start, int end) |
decaf::io::Writer::Writer | ( | ) |
virtual decaf::io::Writer::~Writer | ( | ) | [virtual] |
virtual decaf::lang::Appendable& decaf::io::Writer::append | ( | char | value | ) | [virtual] |
Appends the specified character to this Appendable.
value | The character to append. |
Exception | if an error occurs. |
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.
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". |
Exception | if an error occurs. |
Implements decaf::lang::Appendable.
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.
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. |
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::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 | ( | char | v | ) | [virtual] |
Writes an single byte char value.
v | The value to be written. |
IOException | thrown if an error occurs. |
virtual void decaf::io::Writer::write | ( | const std::string & | str | ) | [virtual] |
Writes a string.
str | The string to be written. |
IOException | thrown if an error occurs. |
virtual void decaf::io::Writer::write | ( | const std::string & | str, |
int | offset, | ||
int | length | ||
) | [virtual] |
Writes a string.
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. |
IOException | thrown if an error occurs. |
IndexOutOfBoundsException | if offset+length is greater than the string length. |
virtual void decaf::io::Writer::write | ( | const char * | buffer, |
int | size | ||
) | [virtual] |
Writes a byte array to the output stream.
buffer | The byte array to write (cannot be NULL). |
size | The size in bytes of the buffer passed. |
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.
buffer | The array to be written. |
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.
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. |
IOException | if an I/O error occurs. |
NullPointerException | if buffer is NULL. |
IndexOutOfBoundsException | if offset + length > size of the buffer. |