#include <src/main/decaf/io/Writer.h>
|
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) |
|
◆ Writer()
decaf::io::Writer::Writer |
( |
| ) |
|
◆ ~Writer()
virtual decaf::io::Writer::~Writer |
( |
| ) |
|
|
virtual |
◆ append() [1/3]
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.
◆ append() [2/3]
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.
◆ append() [3/3]
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.
◆ doAppendChar()
◆ doAppendCharSequence()
◆ doAppendCharSequenceStartEnd()
◆ doWriteArray()
virtual void decaf::io::Writer::doWriteArray |
( |
const char * | buffer, |
|
|
int | size ) |
|
protectedvirtual |
◆ doWriteArrayBounded()
virtual void decaf::io::Writer::doWriteArrayBounded |
( |
const char * | buffer, |
|
|
int | size, |
|
|
int | offset, |
|
|
int | length ) |
|
protectedpure 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.
◆ doWriteChar()
virtual void decaf::io::Writer::doWriteChar |
( |
char | v | ) |
|
|
protectedvirtual |
◆ doWriteString()
virtual void decaf::io::Writer::doWriteString |
( |
const std::string & | str | ) |
|
|
protectedvirtual |
◆ doWriteStringBounded()
virtual void decaf::io::Writer::doWriteStringBounded |
( |
const std::string & | str, |
|
|
int | offset, |
|
|
int | length ) |
|
protectedvirtual |
◆ doWriteVector()
virtual void decaf::io::Writer::doWriteVector |
( |
const std::vector< char > & | buffer | ) |
|
|
protectedvirtual |
◆ write() [1/6]
virtual void decaf::io::Writer::write |
( |
char | v | ) |
|
|
virtual |
Writes an single byte char value.
- Parameters
-
v | The value to be written. |
- Exceptions
-
◆ write() [2/6]
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. |
◆ write() [3/6]
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. |
◆ write() [4/6]
virtual void decaf::io::Writer::write |
( |
const std::string & | str | ) |
|
|
virtual |
Writes a string.
- Parameters
-
str | The string to be written. |
- Exceptions
-
◆ write() [5/6]
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. |
◆ write() [6/6]
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
-
The documentation for this class was generated from the following file: