@NotThreadSafe public abstract class AbstractCompressedResponseWrapper extends StatusAwareHttpResponseWrapper
HttpServletResponseWrapper| Modifier and Type | Field and Description |
|---|---|
static int |
DEFAULT_MIN_COMPRESSED_SIZE
The minimum size where compression is applied
|
SC_ACCEPTED, SC_BAD_GATEWAY, SC_BAD_REQUEST, SC_CONFLICT, SC_CONTINUE, SC_CREATED, SC_EXPECTATION_FAILED, SC_FORBIDDEN, SC_FOUND, SC_GATEWAY_TIMEOUT, SC_GONE, SC_HTTP_VERSION_NOT_SUPPORTED, SC_INTERNAL_SERVER_ERROR, SC_LENGTH_REQUIRED, SC_METHOD_NOT_ALLOWED, SC_MOVED_PERMANENTLY, SC_MOVED_TEMPORARILY, SC_MULTIPLE_CHOICES, SC_NO_CONTENT, SC_NON_AUTHORITATIVE_INFORMATION, SC_NOT_ACCEPTABLE, SC_NOT_FOUND, SC_NOT_IMPLEMENTED, SC_NOT_MODIFIED, SC_OK, SC_PARTIAL_CONTENT, SC_PAYMENT_REQUIRED, SC_PRECONDITION_FAILED, SC_PROXY_AUTHENTICATION_REQUIRED, SC_REQUEST_ENTITY_TOO_LARGE, SC_REQUEST_TIMEOUT, SC_REQUEST_URI_TOO_LONG, SC_REQUESTED_RANGE_NOT_SATISFIABLE, SC_RESET_CONTENT, SC_SEE_OTHER, SC_SERVICE_UNAVAILABLE, SC_SWITCHING_PROTOCOLS, SC_TEMPORARY_REDIRECT, SC_UNAUTHORIZED, SC_UNSUPPORTED_MEDIA_TYPE, SC_USE_PROXY| Constructor and Description |
|---|
AbstractCompressedResponseWrapper(javax.servlet.http.HttpServletRequest aHttpRequest,
javax.servlet.http.HttpServletResponse aHttpResponse,
String sContentEncoding) |
| Modifier and Type | Method and Description |
|---|---|
void |
addHeader(String sHeaderName,
String sHeaderValue) |
protected abstract AbstractCompressedServletOutputStream |
createCompressedOutputStream(javax.servlet.http.HttpServletRequest aHttpRequest,
javax.servlet.http.HttpServletResponse aHttpResponse,
String sContentEncoding,
long nContentLength,
int nMinCompressSize) |
void |
finish() |
void |
flushBuffer() |
javax.servlet.ServletOutputStream |
getOutputStream() |
PrintWriter |
getWriter() |
void |
reset() |
void |
resetBuffer() |
void |
sendError(int sc) |
void |
sendError(int sc,
String msg) |
void |
sendRedirect(String sLocation) |
void |
setContentType(String sContentType) |
void |
setHeader(String sHeaderName,
String sHeaderValue) |
void |
setIntHeader(String sHeaderName,
int nHeaderValue) |
void |
setNoCompression() |
void |
setStatus(int sc) |
void |
setStatus(int sc,
String sm)
Deprecated.
|
addDateHeader, addIntHeader, getStatusCode, headerMap, setContentLength, setDateHeader, wrapaddCookie, containsHeader, encodeRedirectUrl, encodeRedirectURL, encodeUrl, encodeURL, getHeader, getHeaderNames, getHeaders, getStatusgetBufferSize, getCharacterEncoding, getContentType, getLocale, getResponse, isCommitted, isWrapperFor, isWrapperFor, setBufferSize, setCharacterEncoding, setContentLengthLong, setLocale, setResponsepublic static final int DEFAULT_MIN_COMPRESSED_SIZE
public void setNoCompression()
public void setContentType(@Nonnull String sContentType)
setContentType in interface javax.servlet.ServletResponsesetContentType in class StatusAwareHttpResponseWrapperpublic void setStatus(int sc)
setStatus in interface javax.servlet.http.HttpServletResponsesetStatus in class StatusAwareHttpResponseWrapper@Deprecated public void setStatus(int sc, String sm)
setStatus in interface javax.servlet.http.HttpServletResponsesetStatus in class StatusAwareHttpResponseWrapperpublic void addHeader(String sHeaderName, String sHeaderValue)
addHeader in interface javax.servlet.http.HttpServletResponseaddHeader in class StatusAwareHttpResponseWrapperpublic void setHeader(String sHeaderName, String sHeaderValue)
setHeader in interface javax.servlet.http.HttpServletResponsesetHeader in class StatusAwareHttpResponseWrapperpublic void setIntHeader(String sHeaderName, int nHeaderValue)
setIntHeader in interface javax.servlet.http.HttpServletResponsesetIntHeader in class StatusAwareHttpResponseWrapperpublic final void flushBuffer()
throws IOException
flushBuffer in interface javax.servlet.ServletResponseflushBuffer in class javax.servlet.ServletResponseWrapperIOExceptionpublic void reset()
reset in interface javax.servlet.ServletResponsereset in class StatusAwareHttpResponseWrapperpublic void resetBuffer()
resetBuffer in interface javax.servlet.ServletResponseresetBuffer in class javax.servlet.ServletResponseWrapperpublic void sendError(int sc,
String msg)
throws IOException
sendError in interface javax.servlet.http.HttpServletResponsesendError in class StatusAwareHttpResponseWrapperIOExceptionpublic void sendError(int sc)
throws IOException
sendError in interface javax.servlet.http.HttpServletResponsesendError in class StatusAwareHttpResponseWrapperIOExceptionpublic void sendRedirect(String sLocation) throws IOException
sendRedirect in interface javax.servlet.http.HttpServletResponsesendRedirect in class StatusAwareHttpResponseWrapperIOExceptionpublic final void finish()
throws IOException
IOException@Nonnull protected abstract AbstractCompressedServletOutputStream createCompressedOutputStream(@Nonnull javax.servlet.http.HttpServletRequest aHttpRequest, @Nonnull javax.servlet.http.HttpServletResponse aHttpResponse, @Nonnull @Nonempty String sContentEncoding, long nContentLength, @Nonnegative int nMinCompressSize) throws IOException
IOException@Nonnull public final javax.servlet.ServletOutputStream getOutputStream() throws IOException
getOutputStream in interface javax.servlet.ServletResponsegetOutputStream in class javax.servlet.ServletResponseWrapperIOException@Nonnull public final PrintWriter getWriter() throws IOException
getWriter in interface javax.servlet.ServletResponsegetWriter in class javax.servlet.ServletResponseWrapperIOExceptionCopyright © 2016–2019 Philip Helger. All rights reserved.