public class StringBufferWriter extends Writer
Constructor and Description |
---|
StringBufferWriter(StringBuffer buffer)
Create a new string writer which will append the text to the given StringBuffer
|
Modifier and Type | Method and Description |
---|---|
void |
close()
Closing a StringWriter has no effect.
|
void |
flush()
Flush the stream.
|
String |
toString()
Return the buffer's current value as a string.
|
void |
write(char[] text,
int offset,
int length)
Write a portion of an array of characters.
|
void |
write(int c)
Write a single character.
|
void |
write(String text)
Write a string.
|
void |
write(String text,
int offset,
int length)
Write a portion of a string.
|
public StringBufferWriter(StringBuffer buffer)
public void write(char[] text, int offset, int length)
public void write(String text, int offset, int length)
public String toString()
public void flush()
public void close() throws IOException
close
in interface Closeable
close
in interface AutoCloseable
close
in class Writer
IOException