org.nutz.lang.stream
类 StringOutputStream
java.lang.Object
java.io.OutputStream
org.nutz.lang.stream.StringOutputStream
- 所有已实现的接口:
- java.io.Closeable, java.io.Flushable
public class StringOutputStream
- extends java.io.OutputStream
从类 java.io.OutputStream 继承的方法 |
write, write |
从类 java.lang.Object 继承的方法 |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
StringOutputStream
public StringOutputStream(java.lang.StringBuilder sb)
StringOutputStream
public StringOutputStream(java.lang.StringBuilder sb,
java.lang.String charset)
write
public void write(int b)
throws java.io.IOException
- 完成本方法后,确认字符串已经完成写入后,务必调用flash方法!
- 指定者:
- 类
java.io.OutputStream
中的 write
- 抛出:
java.io.IOException
flush
public void flush()
throws java.io.IOException
- 使用StringBuilder前,务必调用
- 指定者:
- 接口
java.io.Flushable
中的 flush
- 覆盖:
- 类
java.io.OutputStream
中的 flush
- 抛出:
java.io.IOException
close
public void close()
throws java.io.IOException
- 指定者:
- 接口
java.io.Closeable
中的 close
- 覆盖:
- 类
java.io.OutputStream
中的 close
- 抛出:
java.io.IOException
getStringBuilder
public java.lang.StringBuilder getStringBuilder()