public class StringOutputStream extends OutputStream
| Constructor and Description |
|---|
StringOutputStream(StringBuilder sb) |
StringOutputStream(StringBuilder sb,
String charset) |
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
void |
flush()
使用StringBuilder前,务必调用
|
StringBuilder |
getStringBuilder() |
void |
write(int b)
完成本方法后,确认字符串已经完成写入后,务必调用flash方法!
|
write, writepublic StringOutputStream(StringBuilder sb)
public StringOutputStream(StringBuilder sb, String charset)
public void write(int b)
throws IOException
write in class OutputStreamIOExceptionpublic void flush()
throws IOException
flush in interface Flushableflush in class OutputStreamIOExceptionpublic void close()
throws IOException
close in interface Closeableclose in interface AutoCloseableclose in class OutputStreamIOExceptionpublic StringBuilder getStringBuilder()
Copyright © 2017. All rights reserved.