public class StringOutputStream extends OutputStream
| 构造器和说明 |
|---|
StringOutputStream(StringBuilder sb) |
StringOutputStream(StringBuilder sb,
String charset) |
| 限定符和类型 | 方法和说明 |
|---|---|
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 在类中 OutputStreamIOExceptionpublic void flush()
throws IOException
flush 在接口中 Flushableflush 在类中 OutputStreamIOExceptionpublic void close()
throws IOException
close 在接口中 Closeableclose 在接口中 AutoCloseableclose 在类中 OutputStreamIOExceptionpublic StringBuilder getStringBuilder()
Copyright © 2017. All rights reserved.