| Constructor Summary | |
CharArrayWriter() Creates a new CharArrayWriter. 创建一个CharArrayWriter。 | |
CharArrayWriter(int initialSize) Creates a new CharArrayWriter with the specified initial size. 创建一个指定初始大小的CharArrayWriter。 | |
| Method Summary | |
void | close() Close the stream. 关闭流。 |
void | flush() Flush the stream. 刷新流。 |
void | reset() Resets the buffer so that you can use it again without throwing away the already allocated buffer. 重置缓冲,可以使你再次使用,而不用抛出已分配的缓冲。 |
int | size() Returns the current size of the buffer. 返回缓冲的当前大小。 |
char[] | toCharArray() Returns a copy of the input data. 返回输入数据的拷贝。 |
String | toString() Converts input data to a string. 将输入数据转换成字符串。 |
void | write(char[] c, int off, int len) Writes characters to the buffer. 向缓冲写入字符。 |
void | write(int c) Writes a character to the buffer. 向缓冲写入一个字符。 |
void | write(String str, int off, int len) Write a portion of a string to the buffer. 向缓冲写入一段字符串。 |
void | writeTo(Writer out) Writes the contents of the buffer to another character stream. 将缓冲的内容写入另一个字符流。 |
| Methods inherited from class java.io.Writer |
write, write |