An output stream for writing servlet responses. This is an
abstract class, to be implemented by a network services
implementor. Servlet writers use the output stream to return data
to clients. They access it via the ServletResponse's
getOutputStream method, available from within the servlet's service
method. Subclasses of ServletOutputStream must provide an
implementation of the write(int) method.
This implementation is friendly to servlets which return "small"
responses and don't compute Content-Length -- it will compute this
header for them automatically.
author: Stan Bailes
setResponse(HttpResponse res) Set up the connection with the http response object so we can
control flushing the headers when we've reached our buffered
limit.
Set up the connection with the http response object so we can
control flushing the headers when we've reached our buffered
limit.
Parameters: res - the http response object associated with this request
Write a byte to the stream
Parameters: b - the byte
write
public void write(byte[] buf, int off, int len) throws IOException(Code)
Write a bunch of bytes in one shot.
Parameters: buf - a buffer where those bytes live Parameters: off - the position in the buffer of the first byte to write Parameters: len - the number of bytes to write exception: IOException - may be thrown
Methods inherited from javax.servlet.ServletOutputStream