public class GzipUtils extends Object
| Modifier and Type | Method and Description |
|---|---|
static OutputStream |
checkAndWrap(javax.servlet.http.HttpServletRequest httpRequest,
javax.servlet.http.HttpServletResponse httpResponse,
boolean requireWantsHeader)
Checks if the HTTP request/response accepts and wants GZIP and i that case wraps the response output stream in a
GZIPOutputStream. |
public static OutputStream checkAndWrap(javax.servlet.http.HttpServletRequest httpRequest, javax.servlet.http.HttpServletResponse httpResponse, boolean requireWantsHeader) throws IOException
GZIPOutputStream.httpRequest - the HTTP servlet request.httpResponse - the HTTP servlet response.requireWantsHeader - if wants header is requiredGZIPOutputStream otherwise the unchanged response
output stream.IOException - in case of IO error.Copyright © 2016. All rights reserved.