This is based on java.io.StringWriter but backed by a
StringBuilder instead.
This class is not thread safe.
| Modifier and Type | Field and Description |
|---|---|
| protected StringBuilder |
| Access | Constructor and Description |
|---|---|
| public | |
| public | FastStringWriter(int
specifies the initial capacity of the buffer initialCapacity)Constructs a new |
| Modifier and Type | Method and Description |
|---|---|
| public void | close()
Implements abstract java. Implements java. This is a no-op. |
| public void | flush()
Implements abstract java. Implements java. This is a no-op. |
| public StringBuilder | |
| public void | |
| public String | Returns: the buffer's current value as a string.Overrides java. |
| public void | write(char[]
Array of characters cbuf, int Offset from which to start writing characters off, int Number of characters to write len)Implements abstract java. Write a portion of an array of characters. |
| public void | |
| public void | write(String
A String str, int Offset from which to start writing characters off, int Number of characters to write len)Overrides java. |
| builder | back to summary |
|---|---|
| protected StringBuilder builder | |
| FastStringWriter | back to summary |
|---|---|
| public FastStringWriter() Constructs a new | |
| FastStringWriter | back to summary |
|---|---|
| public FastStringWriter(int initialCapacity) Constructs a new
| |
| close | back to summary |
|---|---|
| public void close() throws IOException Implements abstract java. Implements java. This is a no-op.
| |
| flush | back to summary |
|---|---|
| public void flush() throws IOException Implements abstract java. Implements java. This is a no-op.
| |
| getBuffer | back to summary |
|---|---|
| public StringBuilder getBuffer() Return the
| |
| reset | back to summary |
|---|---|
| public void reset() | |
| toString | back to summary |
|---|---|
| public String toString() Overrides java. Doc from java. Returns a string representation of the object. | |
| write | back to summary |
|---|---|
| public void write(char[] cbuf, int off, int len) throws IOException Implements abstract java. Write a portion of an array of characters.
| |
| write | back to summary |
|---|---|
| public void write(String str) Overrides java. Write a string. | |
| write | back to summary |
|---|---|
| public void write(String str, int off, int len) Overrides java. Write a portion of a string. | |