Module java.base
Package java.io

Class CharArrayWriter

java.lang.Object
java.io.Writer
java.io.CharArrayWriter
All Implemented Interfaces:
Closeable, Flushable, Appendable, AutoCloseable

public class CharArrayWriter extends Writer
This class implements a character buffer that can be used as a Writer. The buffer automatically grows when data is written to the stream. The data can be retrieved using toCharArray() and toString().

Note: Invoking close() on this class has no effect, and methods of this class can be called after the stream has closed without generating an IOException.

Since:
1.1