public class GZIPResponseWrapper
extends HttpServletResponseWrapper
| Modifier and Type | Field and Description |
|---|---|
protected HttpServletResponse |
origResponse |
protected ServletOutputStream |
outputStream |
protected java.io.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. |
java.io.PrintWriter |
getWriter()
Returns the underlying
PrintWriter which in turn is backed up by an GZIPResponseStream. |
void |
setContentLength(int length)
This implementation of
javax.servlet.ServletResponseWrapper#setContentLength(int) does nothing. |
protected HttpServletResponse origResponse
protected ServletOutputStream outputStream
protected java.io.PrintWriter printWriter
public GZIPResponseWrapper(HttpServletResponse response)
response - original HttpServletResponse object.public ServletOutputStream getOutputStream()
throws java.io.IOException
GZIPResponseStream.java.io.IOExceptionpublic java.io.PrintWriter getWriter()
throws java.io.IOException
PrintWriter which in turn is backed up by an GZIPResponseStream.java.io.IOExceptionpublic ServletOutputStream createOutputStream()
throws java.io.IOException
GZIPResponseStream.java.io.IOExceptionpublic void flushBuffer()
throws java.io.IOException
java.io.IOExceptionpublic void finishResponse()
public void setContentLength(int length)
javax.servlet.ServletResponseWrapper#setContentLength(int) does nothing. The
correct content length header will be set when the underlying GZIPResponseStream is closed (via
GZIPResponseStream.close()).Copyright © 2018 SAP SE. All Rights Reserved.