public class GZipUtil extends Object
Constructor and Description |
---|
GZipUtil() |
Modifier and Type | Method and Description |
---|---|
static byte[] |
gzip(byte[] ungzipped) |
static boolean |
isAcceptsGzip(javax.servlet.http.HttpServletRequest request)
True if the response should be gzipped.
|
static boolean |
isGZipMimeType(String contentType) |
static boolean |
isGZipped(byte[] candidate)
Checks the first two bytes of the candidate byte array for the magic number 0x677a.
|
static byte[] |
ungzip(byte[] gzipped) |
public static byte[] gzip(byte[] ungzipped) throws IOException
IOException
public static byte[] ungzip(byte[] gzipped) throws IOException
IOException
public static boolean isGZipped(byte[] candidate)
public static boolean isGZipMimeType(String contentType)
public static boolean isAcceptsGzip(javax.servlet.http.HttpServletRequest request)
Copyright © 2015 Magnolia International Ltd.. All rights reserved.