Fields
Name | Description |
---|---|
buf | The buffer where data is stored. |
count | The number of chars in the buffer. |
Constructors
Name | Description |
---|---|
CharArrayWriter() | Creates a new CharArrayWriter. |
CharArrayWriter(int) | Creates a new CharArrayWriter with the specified initial size. |
Methods
Name | Description |
---|---|
close() | Close the stream. |
flush() | Flush the stream. |
reset() | Resets the buffer so that you can use it again without throwing away the already allocated buffer. |
size() | Returns the current size of the buffer. |
toCharArray() | Returns a copy of the input data. |
toString() | Converts input data to a string. |
write(char[], int, int) | Writes characters to the buffer. |
write(int) | Writes a character to the buffer. |
write(String, int, int) | Write a portion of a string to the buffer. |
writeTo(Writer) | Writes the contents of the buffer to another character stream. |