Java examples for File Path IO:GZIP
Has user disable gzip (e.g., for benchmarking) in HttpServletRequest
import java.io.IOException; import java.io.PrintWriter; import java.util.zip.GZIPOutputStream; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; public class Main{ /** Has user disable gzip (e.g., for benchmarking)? */ public static boolean isGzipDisabled(HttpServletRequest request) { String flag = request.getParameter("disabledGzip"); return ((flag != null) && (!flag.equalsIgnoreCase("false"))); }// w w w . j a v a2 s .c o m }