edu.rice.comp211.laundry.io
Class StringOutputStream

java.lang.Object
  extended by java.io.OutputStream
      extended by edu.rice.comp211.laundry.io.StringOutputStream
All Implemented Interfaces:
Closeable, Flushable

public class StringOutputStream
extends OutputStream


Field Summary
protected  StringBuilder buffer
          Buffer containing the stream
 
Constructor Summary
StringOutputStream()
           
 
Method Summary
 void close()
          Relying on default constructor
 void flush()
           
 String toString()
           
 void write(byte[] b)
           
 void write(byte[] b, int off, int len)
           
 void write(int b)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

buffer

protected StringBuilder buffer
Buffer containing the stream

Constructor Detail

StringOutputStream

public StringOutputStream()
Method Detail

close

public void close()
Relying on default constructor

Specified by:
close in interface Closeable
Overrides:
close in class OutputStream

flush

public void flush()
Specified by:
flush in interface Flushable
Overrides:
flush 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

toString

public String toString()
Overrides:
toString in class Object