Public class StringWriter extends Writer
Constructor | Description |
---|---|
String writer() | The function of this constructor is to create the string writer instance and used to write from the character stream. |
String writer(int initialSize) | The function of this constructor is to create the string writer with represented size of the string buffer. |
Method | Description |
---|---|
void close () | The function of this method is to close the present stream and associated to this stream, systems resources are released without any impact. |
StringWriter append(char c) | The function of this method is to append the given character to the writer. |
void write (Char[] cbuf, int off, int n) | By using this method it writes the data up to ‘n’ length from the output stream to an array of Characters. |
void write (int c) | The function of this method is to write the represented character into output stream. |
void write (String str, int off, int n) | The function of this method is to write the string up to 'n' length. |