Create a new string writer using the default initial string-buffer size.
Create a new string writer using the specified initial string-buffer size.
Appends the specified character to this writer.
Closing a {@code StringWriter} has no effect. The methods in this class can be called after the stream has been closed without generating an {@code IOException}.
Flush the stream.
Return the string buffer itself.
Return the buffer's current value as a string.
Write a single character.
Write a portion of an array of characters.
Write a string.
Write a portion of a string.
The object used to synchronize operations on this stream. For efficiency, a character-stream object may use an object other than itself to protect critical sections. A subclass should therefore use the object in this field rather than {@code this} or a synchronized method.
Writes a single character. The character to be written is contained in the 16 low-order bits of the given integer value; the 16 high-order bits are ignored.
Writes an array of characters.
Writes a portion of an array of characters.
Writes a string.
Writes a portion of a string.
Appends the specified character sequence to this writer.
Appends a subsequence of the specified character sequence to this writer. {@code Appendable}.
Appends the specified character to this writer.
Flushes the stream. If the stream has saved any characters from the various write() methods in a buffer, write them immediately to their intended destination. Then, if that destination is another character or byte stream, flush it. Thus one flush() invocation will flush all the buffers in a chain of Writers and OutputStreams.
Closes the stream, flushing it first. Once the stream has been closed, further write() or flush() invocations will cause an IOException to be thrown. Closing a previously closed stream has no effect.
A character stream that collects its output in a string buffer, which can then be used to construct a string. <p> Closing a {@code StringWriter} has no effect. The methods in this class can be called after the stream has been closed without generating an {@code IOException}.
@author Mark Reinhold