public class StringWriter extends Writer implements Appendable
| Constructor and Description |
|---|
StringWriter() |
StringWriter(int initialSize) |
| Modifier and Type | Method and Description |
|---|---|
StringWriter |
append(char c) |
StringWriter |
append(CharSequence csq) |
StringWriter |
append(CharSequence csq,
int start,
int end) |
void |
close() |
void |
flush() |
StringBuffer |
getBuffer() |
String |
toString() |
void |
write(char[] cbuf) |
void |
write(char[] cbuf,
int off,
int len) |
void |
write(int c) |
void |
write(String str) |
void |
write(String str,
int off,
int len) |
public StringWriter()
public StringWriter(int initialSize)
public void close()
throws IOException
close in interface AutoCloseableclose in class WriterIOExceptionpublic void flush()
throws IOException
flush in class WriterIOExceptionpublic void write(char[] cbuf,
int off,
int len)
throws IOException
write in class WriterIOExceptionpublic void write(String str, int off, int len) throws IOException
write in class WriterIOExceptionpublic void write(int c)
throws IOException
write in class WriterIOExceptionpublic void write(String str) throws IOException
write in class WriterIOExceptionpublic void write(char[] cbuf)
throws IOException
write in class WriterIOExceptionpublic StringBuffer getBuffer()
public StringWriter append(char c)
append in interface Appendablepublic StringWriter append(CharSequence csq)
append in interface Appendablepublic StringWriter append(CharSequence csq, int start, int end)
append in interface AppendableCopyright © 2026. All rights reserved.