![]() |
Quadcap Embeddable Server |
Inheritance diagram for com.quadcap.http.server22.HttpOutputStream:

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.
Definition at line 68 of file HttpOutputStream.java.
Public Member Functions | |
| void | reset (WorkerOutputStream os) |
| Construct a new http output stream, attached to the specified worker output stream. | |
| void | write (int b) throws IOException |
| Write a byte to the stream. | |
| void | write (byte[] buf, int off, int len) throws IOException |
| Write a bunch of bytes in one shot. | |
| final void | flushBuffered () throws IOException |
| Flush any buffered output to tht client. | |
| final void | flush () throws IOException |
| Flush the underlying stream. | |
| final void | close () throws IOException |
| Close does nothing, to prevent clients from closing streams when they really don't want to. | |
| final void | reallyClose () throws IOException |
| boolean | discard () |
| Discard any bytes written so far if possible, and return true if we were able to do so. | |
| int | getRemaining () |
Package Functions | |
| void | 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. | |
| WorkerOutputStream | getOutputStream () |
| Return the underlying output stream. | |
| final void | setBufferSize (int size) throws IllegalStateException |
| final int | getBufferSize () |
| final boolean | isCommitted () |
| final void | reset () throws IllegalStateException |
| final boolean | getAutoFlush () |
| final void | setAutoFlush (boolean autoFlush) |
Package Attributes | |
| WorkerOutputStream | os |
| HttpResponse | res |
| ByteArrayOutputStream | bos = new ByteArrayOutputStream() |
| boolean | committed = false |
| boolean | autoFlush = true |
| int | bufferSize = 32 * 1024 |
|
|
Close does nothing, to prevent clients from closing streams when they really don't want to.
Definition at line 156 of file HttpOutputStream.java. References com.quadcap.http.server22.HttpOutputStream.flushBuffered(). Referenced by com.quadcap.http.server22.JspWriter.close(), and com.quadcap.http.server22.WebWorker.doSession(). |
|
|
Discard any bytes written so far if possible, and return true if we were able to do so.
Definition at line 168 of file HttpOutputStream.java. References com.quadcap.http.server22.HttpOutputStream.bos, and com.quadcap.http.server22.HttpOutputStream.committed. Referenced by com.quadcap.http.server22.HttpResponse.sendError(). |
|
|
Flush the underlying stream.
Definition at line 148 of file HttpOutputStream.java. References com.quadcap.http.server22.HttpOutputStream.flushBuffered(). Referenced by com.quadcap.http.server22.JspWriter.flush(), and com.quadcap.http.server22.HttpResponse.flush(). |
|
|
Flush any buffered output to tht client.
Definition at line 132 of file HttpOutputStream.java. References com.quadcap.http.server22.HttpOutputStream.bos, com.quadcap.http.server22.HttpOutputStream.committed, com.quadcap.http.server22.HttpResponse.maybeSetContentLength(), com.quadcap.http.server22.HttpOutputStream.os, com.quadcap.http.server22.HttpOutputStream.res, and com.quadcap.http.server22.HttpResponse.writeHeaders(). Referenced by com.quadcap.http.server22.HttpOutputStream.close(), com.quadcap.http.server22.HttpOutputStream.flush(), and com.quadcap.http.server22.HttpResponse.flushBuffer(). |
|
|
Definition at line 214 of file HttpOutputStream.java. References com.quadcap.http.server22.HttpOutputStream.autoFlush. |
|
|
Definition at line 199 of file HttpOutputStream.java. References com.quadcap.http.server22.HttpOutputStream.bufferSize. Referenced by com.quadcap.http.server22.HttpResponse.getBufferSize(). |
|
|
Return the underlying output stream.
Definition at line 190 of file HttpOutputStream.java. References com.quadcap.http.server22.HttpOutputStream.os. Referenced by com.quadcap.http.server22.HttpResponse.writeHeaders(). |
|
|
Definition at line 222 of file HttpOutputStream.java. References com.quadcap.http.server22.HttpOutputStream.bos, and com.quadcap.http.server22.HttpOutputStream.bufferSize. Referenced by com.quadcap.http.server22.JspWriter.getRemaining(). |
|
|
Definition at line 203 of file HttpOutputStream.java. References com.quadcap.http.server22.HttpOutputStream.committed. Referenced by com.quadcap.http.server22.HttpResponse.isCommitted(). |
|
|
Definition at line 160 of file HttpOutputStream.java. References com.quadcap.http.server22.HttpOutputStream.os. Referenced by com.quadcap.http.server22.WebWorker.doSession(). |
|
|
Definition at line 207 of file HttpOutputStream.java. References com.quadcap.http.server22.HttpOutputStream.bos, and com.quadcap.http.server22.HttpOutputStream.committed. |
|
|
Construct a new http output stream, attached to the specified worker output stream.
Definition at line 83 of file HttpOutputStream.java. Referenced by com.quadcap.http.server22.JspWriter.clear(), com.quadcap.http.server22.JspWriter.clearBuffer(), com.quadcap.http.server22.WebWorker.doSession(), and com.quadcap.http.server22.HttpResponse.reset(). |
|
|
Definition at line 218 of file HttpOutputStream.java. References com.quadcap.http.server22.HttpOutputStream.setAutoFlush(). Referenced by com.quadcap.http.server22.JspWriter.setAutoFlush(), and com.quadcap.http.server22.HttpOutputStream.setAutoFlush(). |
|
|
|
Set up the connection with the http response object so we can control flushing the headers when we've reached our buffered limit.
Definition at line 183 of file HttpOutputStream.java. References com.quadcap.http.server22.HttpOutputStream.setResponse(). Referenced by com.quadcap.http.server22.HttpOutputStream.setResponse(). |
|
||||||||||||||||
|
Write a bunch of bytes in one shot.
Definition at line 116 of file HttpOutputStream.java. References com.quadcap.http.server22.HttpOutputStream.bos, com.quadcap.http.server22.HttpOutputStream.bufferSize, com.quadcap.http.server22.HttpOutputStream.committed, com.quadcap.http.server22.HttpOutputStream.os, com.quadcap.http.server22.HttpOutputStream.res, and com.quadcap.http.server22.HttpResponse.writeHeaders(). |
|
|
Write a byte to the stream.
Definition at line 94 of file HttpOutputStream.java. References com.quadcap.http.server22.HttpOutputStream.bos, com.quadcap.http.server22.HttpOutputStream.bufferSize, com.quadcap.http.server22.HttpOutputStream.committed, com.quadcap.http.server22.HttpOutputStream.os, com.quadcap.http.server22.HttpOutputStream.res, com.quadcap.http.server22.HttpOutputStream.write(), and com.quadcap.http.server22.HttpResponse.writeHeaders(). Referenced by com.quadcap.http.server22.JspWriter.print(), com.quadcap.http.server22.JspWriter.write(), and com.quadcap.http.server22.HttpOutputStream.write(). |
|
|
Definition at line 73 of file HttpOutputStream.java. Referenced by com.quadcap.http.server22.HttpOutputStream.getAutoFlush(). |
|
|
|
Definition at line 75 of file HttpOutputStream.java. Referenced by com.quadcap.http.server22.HttpOutputStream.getBufferSize(), com.quadcap.http.server22.HttpOutputStream.getRemaining(), and com.quadcap.http.server22.HttpOutputStream.write(). |
|
|
|
|
Definition at line 70 of file HttpOutputStream.java. Referenced by com.quadcap.http.server22.HttpOutputStream.flushBuffered(), and com.quadcap.http.server22.HttpOutputStream.write(). |