|
FlexDoc/Javadoc 2.0 Demo Java Doc |
Closing a StringWriter has no effect. The methods in this class can be called after the stream has been closed without generating an IOException.
Field Summary |
Fields inherited from class java.io.Writer |
Constructor Summary |
||
Create a new string writer using the default initial string-buffer
size.
|
||
StringWriter(int initialSize)
Create a new string writer using the specified initial string-buffer
size.
|
Method Summary |
||
append(char c)
Appends the specified character to this writer.
|
||
append(CharSequence csq)
Appends the specified character sequence to this writer.
|
||
append(CharSequence csq, int start, int end)
Appends a subsequence of the specified character sequence to this writer.
|
||
void |
close()
Closing a StringWriter has no effect.
|
|
void |
flush()
Flush the stream.
|
|
Return the string buffer itself.
|
||
toString()
Return the buffer's current value as a string.
|
||
void |
write(char[] cbuf, int off, int len)
Write a portion of an array of characters.
|
|
void |
write(int c)
Write a single character.
|
|
void |
Write a string.
|
|
void |
Write a portion of a string.
|
Methods inherited from class java.io.Writer |
Methods inherited from class java.lang.Object |
public StringWriter |
() |
public StringWriter |
(int initialSize) |
public void write |
(int c) |
public void write |
(char[] cbuf, int off, int len) |
public void write |
(String str) |
public void write |
public StringWriter append |
(CharSequence csq) |
An invocation of this method of the form out.append(csq) behaves in exactly the same way as the invocation
out.write(csq.toString())
Depending on the specification of toString for the character sequence csq, the entire sequence may not be appended. For instance, invoking the toString method of a character buffer will return a subsequence whose content depends upon the buffer's position and limit.
public StringWriter append |
An invocation of this method of the form out.append(csq, start, end) when csq is not null, behaves in exactly the same way as the invocation
out.write(csq.subSequence(start, end).toString())
public StringWriter append |
(char c) |
An invocation of this method of the form out.append(c) behaves in exactly the same way as the invocation
out.write(c)
public String toString |
() |
public StringBuffer getBuffer |
() |
public void flush |
() |
The flush method of StringWriter does nothing.
public void close |
() |
throws |
|
FlexDoc/Javadoc 2.0 Demo Java Doc |