cz.cuni.amis.utils
Class StringOutputStream

Package class diagram package StringOutputStream
java.lang.Object
  extended by java.io.OutputStream
      extended by cz.cuni.amis.utils.StringOutputStream
All Implemented Interfaces:
Closeable, Flushable, Serializable

public class StringOutputStream
extends OutputStream
implements 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()
           
 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
 

Constructor Detail

StringOutputStream

public StringOutputStream()
Creates new StringOutputStream, makes a new internal StringBuffer.

Method Detail

getString

public String getString()
Returns string from the underlying buffer

Returns:

close

public void close()
Specified by:
close in interface Closeable
Overrides:
close in class OutputStream

write

public void write(byte[] b)
Overrides:
write in class OutputStream

write

public void write(byte[] b,
                  int off,
                  int len)
Overrides:
write in class OutputStream

write

public void write(int b)
Specified by:
write in class OutputStream


Copyright © 2012 AMIS research group, Faculty of Mathematics and Physics, Charles University in Prague, Czech Republic. All Rights Reserved.