org.cdlib.xtf.test
Class FakeOutputStream

Object
  extended by OutputStream
      extended by ServletOutputStream
          extended by FakeOutputStream
All Implemented Interfaces:
Closeable, Flushable

public class FakeOutputStream
extends ServletOutputStream

Used to gather output from dynaXML or crossQuery during a test.

Author:
Martin Haye

Field Summary
(package private)  ByteArrayOutputStream buf
           
 
Constructor Summary
FakeOutputStream()
           
 
Method Summary
 int length()
           
 String toString()
           
 void write(int b)
           
 
Methods inherited from class ServletOutputStream
print, print, print, print, print, print, print, println, println, println, println, println, println, println, println
 
Methods inherited from class OutputStream
close, flush, write, write
 
Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

buf

ByteArrayOutputStream buf
Constructor Detail

FakeOutputStream

public FakeOutputStream()
Method Detail

write

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

length

public int length()

toString

public String toString()
Overrides:
toString in class Object