nl.imsystems.atag.servlet
Class ByteArrayServletOutputStream
java.lang.Object
java.io.OutputStream
javax.servlet.ServletOutputStream
nl.imsystems.atag.servlet.ByteArrayServletOutputStream
- All Implemented Interfaces:
- Closeable, Flushable
public class ByteArrayServletOutputStream
- extends ServletOutputStream
A ServletOutputStream implementation that buffers the bytes
written to it in a ByteArrayOutputStream.
- Author:
- kayvan
Method Summary |
byte[] |
getBytes()
Returns the buffered bytes. |
void |
write(int value)
Writes a byte to the buffer. |
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.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ByteArrayServletOutputStream
public ByteArrayServletOutputStream()
getBytes
public byte[] getBytes()
- Returns the buffered bytes.
- Returns:
- the buffered bytes
write
public void write(int value)
throws IOException
- Writes a byte to the buffer.
- Specified by:
write
in class OutputStream
- Throws:
IOException