Package org.aoju.bus.core.io.stream
Class StringOutputStream
java.lang.Object
java.io.OutputStream
org.aoju.bus.core.io.stream.StringOutputStream
- All Implemented Interfaces:
Closeable,Flushable,AutoCloseable
- Since:
- Java 17+
- Author:
- Kimi Liu
-
Constructor Summary
Constructors -
Method Summary
Methods inherited from class java.io.OutputStream
nullOutputStream, write, write
-
Constructor Details
-
StringOutputStream
-
StringOutputStream
-
-
Method Details
-
write
完成本方法后,确认字符串已经完成写入后,务必调用flash方法!- Specified by:
writein classOutputStream- Throws:
IOException
-
flush
使用StringBuilder前,务必调用- Specified by:
flushin interfaceFlushable- Overrides:
flushin classOutputStream- Throws:
IOException
-
close
- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Overrides:
closein classOutputStream- Throws:
IOException
-
getStringBuilder
-