public class GzipUtils extends Object
Modifier and Type | Method and Description |
---|---|
static OutputStream |
checkAndWrap(javax.servlet.http.HttpServletRequest httpRequest,
javax.servlet.http.HttpServletResponse httpResponse)
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) throws IOException
GZIPOutputStream
.httpRequest
- the HTTP servlet request.httpResponse
- the HTTP servlet response.GZIPOutputStream
otherwise the unchanged response
output stream.IOException
- in case of IO error.Copyright © 2015. All rights reserved.