public class GZIPResponseWrapper
extends HttpServletResponseWrapper
| Modifier and Type | Field and Description |
|---|---|
protected HttpServletResponse |
origResponse |
protected ServletOutputStream |
outputStream |
protected PrintWriter |
printWriter |
| Constructor and Description |
|---|
GZIPResponseWrapper(HttpServletResponse response)
Creates a new GZIPResponseWrapper which wraps the given response.
|
| Modifier and Type | Method and Description |
|---|---|
ServletOutputStream |
createOutputStream()
Creates and returns a new
GZIPResponseStream. |
void |
finishResponse()
Finishes this response by closing the underlying stream/writer.
|
void |
flushBuffer()
Flushes the underlying output stream.
|
ServletOutputStream |
getOutputStream()
Returns the underlying
GZIPResponseStream. |
PrintWriter |
getWriter()
Returns the underlying
PrintWriter which in turn is backed up by an GZIPResponseStream. |
void |
setContentLength(int length)
This implementation of
ServletResponseWrapper does nothing. |
protected HttpServletResponse origResponse
protected ServletOutputStream outputStream
protected PrintWriter printWriter
public GZIPResponseWrapper(HttpServletResponse response)
response - original HttpServletResponse object.public ServletOutputStream getOutputStream()
throws IOException
GZIPResponseStream.IOExceptionpublic PrintWriter getWriter() throws IOException
PrintWriter which in turn is backed up by an GZIPResponseStream.IOExceptionpublic ServletOutputStream createOutputStream()
throws IOException
GZIPResponseStream.IOExceptionpublic void flushBuffer()
throws IOException
IOExceptionpublic void finishResponse()
public void setContentLength(int length)
ServletResponseWrapper does nothing. The
correct content length header will be set when the underlying GZIPResponseStream is closed (via
GZIPResponseStream.close()).Copyright © 2017 SAP SE. All Rights Reserved.