| Modifier and Type | Field and Description |
|---|---|
| private String | |
| private String[] | |
| private int | |
| private int | |
| private static final Log | |
| private Pattern | |
| private static final StringManager |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public String | |
| public String[] | |
| public String | Returns: The current compression level in string form (off/on/force)Return compression level. |
| public int | |
| public int | |
| public String | Returns: The regular expression as a StringObtain the String form of the regular expression that defines the user agents to not use gzip with. |
| public Pattern | |
| public void | |
| public void | setCompression(String
One of compression)on, force, off or the minimum compression size
in bytes which implies onSet compression level. |
| public void | setCompressionMinSize(int
The minimum content length required for compression in bytes compressionMinSize)Set Minimum size to trigger compression. |
| public void | setNoCompressionUserAgents(String
The regular expression for user agent strings for which compression should not be
applied noCompressionUserAgents)Set no compression user agent pattern. |
| private static boolean | startsWithStringArray(String[]
the StringArray sArray, String string value)Checks if any entry in the string array starts with the specified value |
| public boolean | Returns: true if compression was enabled for the given response, otherwise falseThe request that triggered the response request, Response The response to consider compressing response)Determines if compression should be enabled for the given response and if it is, sets any necessary headers to mark it as such. |
| compressibleMimeType | back to summary |
|---|---|
| private String compressibleMimeType | |
| compressibleMimeTypes | back to summary |
|---|---|
| private String[] compressibleMimeTypes | |
| compressionLevel | back to summary |
|---|---|
| private int compressionLevel | |
| compressionMinSize | back to summary |
|---|---|
| private int compressionMinSize | |
| log | back to summary |
|---|---|
| private static final Log log | |
| noCompressionUserAgents | back to summary |
|---|---|
| private Pattern noCompressionUserAgents | |
| sm | back to summary |
|---|---|
| private static final StringManager sm | |
| CompressionConfig | back to summary |
|---|---|
| public CompressionConfig() | |
| getCompressibleMimeType | back to summary |
|---|---|
| public String getCompressibleMimeType() | |
| getCompressibleMimeTypes | back to summary |
|---|---|
| public String[] getCompressibleMimeTypes() | |
| getCompression | back to summary |
|---|---|
| public String getCompression() Return compression level.
| |
| getCompressionLevel | back to summary |
|---|---|
| public int getCompressionLevel() | |
| getCompressionMinSize | back to summary |
|---|---|
| public int getCompressionMinSize() | |
| getNoCompressionUserAgents | back to summary |
|---|---|
| public String getNoCompressionUserAgents() Obtain the String form of the regular expression that defines the user agents to not use gzip with.
| |
| getNoCompressionUserAgentsPattern | back to summary |
|---|---|
| public Pattern getNoCompressionUserAgentsPattern() | |
| setCompressibleMimeType | back to summary |
|---|---|
| public void setCompressibleMimeType(String valueS) | |
| setCompression | back to summary |
|---|---|
| public void setCompression(String compression) Set compression level.
| |
| setCompressionMinSize | back to summary |
|---|---|
| public void setCompressionMinSize(int compressionMinSize) Set Minimum size to trigger compression.
| |
| setNoCompressionUserAgents | back to summary |
|---|---|
| public void setNoCompressionUserAgents(String noCompressionUserAgents) Set no compression user agent pattern. Regular expression as supported by
| |
| startsWithStringArray | back to summary |
|---|---|
| private static boolean startsWithStringArray(String[] sArray, String value) Checks if any entry in the string array starts with the specified value | |
| useCompression | back to summary |
|---|---|
| public boolean useCompression(Request request, Response response) Determines if compression should be enabled for the given response and if it is, sets any necessary headers to mark it as such. | |