Package com.logicaldoc.util.io
Class StringOutputStream
- java.lang.Object
-
- java.io.OutputStream
-
- com.logicaldoc.util.io.StringOutputStream
-
- All Implemented Interfaces:
Closeable,Flushable,AutoCloseable
public class StringOutputStream extends OutputStream
An output stram that writes into a string- Since:
- 8.6.1
- Author:
- Marco Meschieri - LogicalDOC
-
-
Constructor Summary
Constructors Constructor Description StringOutputStream()StringOutputStream(StringBuilder sb)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()voidflush()StringgetData()voidwrite(byte b)voidwrite(byte[] b)voidwrite(int i)-
Methods inherited from class java.io.OutputStream
nullOutputStream, write
-
-
-
-
Constructor Detail
-
StringOutputStream
public StringOutputStream()
-
StringOutputStream
public StringOutputStream(StringBuilder sb)
-
-
Method Detail
-
close
public void close() throws IOException- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Overrides:
closein classOutputStream- Throws:
IOException
-
flush
public void flush() throws IOException- Specified by:
flushin interfaceFlushable- Overrides:
flushin classOutputStream- Throws:
IOException
-
write
public void write(byte[] b) throws IOException- Overrides:
writein classOutputStream- Throws:
IOException
-
write
public void write(byte b) throws IOException- Throws:
IOException
-
write
public void write(int i) throws IOException- Specified by:
writein classOutputStream- Throws:
IOException
-
getData
public String getData()
-
-