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, write
public StringOutputStream(StringBuilder sb)
public StringOutputStream(StringBuilder sb, String charset)
public void write(int b) throws IOException
write
in class OutputStream
IOException
public void flush() throws IOException
flush
in interface Flushable
flush
in class OutputStream
IOException
public void close() throws IOException
close
in interface Closeable
close
in interface AutoCloseable
close
in class OutputStream
IOException
public StringBuilder getStringBuilder()
Copyright © 2017. All rights reserved.