If the response overflows the buffer, gzip is skipped and the response is
streamed to the client as its produced, most likely using HTTP/1.1 chunked
encoding. This is useful for servlets that produce mixed-mode content, where
smaller payloads are primarily pure text that compresses well, while much
larger payloads are heavily compressed binary data. UploadPackServlet
is one such servlet.
| Modifier and Type | Field and Description |
|---|---|
| private boolean | |
| private static final int | |
| private final HttpServletRequest | |
| private final HttpServletResponse | |
| private boolean |
| Access | Constructor and Description |
|---|---|
| pack-priv | SmartOutputStream(final HttpServletRequest req, final HttpServletResponse rsp, boolean compressStream)
|
| Modifier and Type | Method and Description |
|---|---|
| public void | close()
Overrides org. Implements java. Closes this output stream and releases any system resources associated with this stream. |
| protected OutputStream | overflow()
Implements abstract org. Open the overflow output stream, so the remaining output can be stored. |
| private void |
| compressStream | back to summary |
|---|---|
| private boolean compressStream | |
| LIMIT | back to summary |
|---|---|
| private static final int LIMIT | |
| req | back to summary |
|---|---|
| private final HttpServletRequest req | |
| rsp | back to summary |
|---|---|
| private final HttpServletResponse rsp | |
| startedOutput | back to summary |
|---|---|
| private boolean startedOutput | |
| SmartOutputStream | back to summary |
|---|---|
| pack-priv SmartOutputStream(final HttpServletRequest req, final HttpServletResponse rsp, boolean compressStream) | |
| close | back to summary |
|---|---|
| public void close() throws IOException Overrides org. Implements java. Doc from org. Closes this output stream and releases any system resources
associated with this stream. The general contract of
| |
| overflow | back to summary |
|---|---|
| protected OutputStream overflow() throws IOException Implements abstract org. Doc from org. Open the overflow output stream, so the remaining output can be stored.
| |
| writeResponse | back to summary |
|---|---|
| private void writeResponse(TemporaryBuffer out) throws IOException | |