cz.cuni.amis.utils
Class StringOutputStream
java.lang.Object
java.io.OutputStream
cz.cuni.amis.utils.StringOutputStream
- All Implemented Interfaces:
- java.io.Closeable, java.io.Flushable, java.io.Serializable
public class StringOutputStream
- extends java.io.OutputStream
- implements java.io.Serializable
OutputStream for the String, writes to StringBuffer.
Based on: http://kickjava.com/src/jodd/util/StringOutputStream.java.htm
Thank you!
- See Also:
- Serialized Form
Constructor Summary |
StringOutputStream()
Creates new StringOutputStream, makes a new internal StringBuffer. |
Method Summary |
void |
close()
|
java.lang.String |
getString()
Returns string from the underlying buffer |
void |
write(byte[] b)
|
void |
write(byte[] b,
int off,
int len)
|
void |
write(int b)
|
Methods inherited from class java.io.OutputStream |
flush |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
StringOutputStream
public StringOutputStream()
- Creates new StringOutputStream, makes a new internal StringBuffer.
getString
public java.lang.String getString()
- Returns string from the underlying buffer
- Returns:
close
public void close()
- Specified by:
close
in interface java.io.Closeable
- Overrides:
close
in class java.io.OutputStream
write
public void write(byte[] b)
- Overrides:
write
in class java.io.OutputStream
write
public void write(byte[] b,
int off,
int len)
- Overrides:
write
in class java.io.OutputStream
write
public void write(int b)
- Specified by:
write
in class java.io.OutputStream