com.mockrunner.mock.web
Class MockServletOutputStream

java.lang.Object
  extended by java.io.OutputStream
      extended by javax.servlet.ServletOutputStream
          extended by com.mockrunner.mock.web.MockServletOutputStream
All Implemented Interfaces:
java.io.Closeable, java.io.Flushable

public class MockServletOutputStream
extends javax.servlet.ServletOutputStream

Mock implementation of ServletOutputStream.


Constructor Summary
MockServletOutputStream()
           
MockServletOutputStream(java.lang.String encoding)
           
 
Method Summary
 void clearContent()
           
 byte[] getBinaryContent()
           
 java.lang.String getContent()
           
 void setEncoding(java.lang.String encoding)
           
 void write(int value)
           
 
Methods inherited from class javax.servlet.ServletOutputStream
print, print, print, print, print, print, print, println, println, println, println, println, println, println, println
 
Methods inherited from class java.io.OutputStream
close, flush, write, write
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MockServletOutputStream

public MockServletOutputStream()

MockServletOutputStream

public MockServletOutputStream(java.lang.String encoding)
Method Detail

setEncoding

public void setEncoding(java.lang.String encoding)

write

public void write(int value)
           throws java.io.IOException
Specified by:
write in class java.io.OutputStream
Throws:
java.io.IOException

getContent

public java.lang.String getContent()

getBinaryContent

public byte[] getBinaryContent()

clearContent

public void clearContent()