|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object java.io.OutputStream javax.servlet.ServletOutputStream org.apache.shale.test.mock.MockServletOutputStream
public class MockServletOutputStream
Mock implementation of ServletOutputStream
.
Constructor Summary | |
---|---|
MockServletOutputStream(ByteArrayOutputStream stream)
Return a default instance. |
Method Summary | |
---|---|
byte[] |
content()
Return the content that has been written to this output stream. |
void |
reset()
Reset this output stream so that it appears no content has been written. |
int |
size()
Return the number of bytes that have been written to this output stream. |
void |
write(int content)
Write the specified content to our internal cache. |
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 |
---|
public MockServletOutputStream(ByteArrayOutputStream stream)
Return a default instance.
stream
- The stream we will use to buffer outputMethod Detail |
---|
public byte[] content()
Return the content that has been written to this output stream.
public void reset()
Reset this output stream so that it appears no content has been written.
public int size()
Return the number of bytes that have been written to this output stream.
public void write(int content)
Write the specified content to our internal cache.
write
in class OutputStream
content
- Content to be written
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |