Tag: java tochararray example

CharArrayWriter Java

April 24, 2011 · 1 min read
Like **[StringWriter](http://way2java.com/io/stringwriter-%e2%80%93-storing-data/)** stores data in a StringBuffer, the **CharArrayWriter** stores data in a character array. The array size increases implicitly when more data is added. The data stored with CharArrayWriter object can be obtained using **toString()** or **toCharArray()** methods. The ealier closing of CharArrayWriter object does not have any affect on the data it stored. Following is the class signature of CharArrayWriter Java