|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectjodd.servlet.filter.GzipFilter
public class GzipFilter
Compresses output with gzip, for browsers that supports it.
Configuration is based on the following initialization parameters:
false. URL is matched as paths.
| Field Summary | |
|---|---|
protected java.lang.String[] |
excludes
|
protected java.lang.String[] |
matches
|
protected int |
threshold
The threshold number to compress, (0 == no compression). |
protected boolean |
wildcards
|
| Constructor Summary | |
|---|---|
GzipFilter()
|
|
| Method Summary | |
|---|---|
void |
destroy()
|
void |
doFilter(javax.servlet.ServletRequest request,
javax.servlet.ServletResponse response,
javax.servlet.FilterChain chain)
If browser supports gzip, sets the Content-Encoding response header and invoke resource with a wrapped response that collects all the output. |
void |
init(javax.servlet.FilterConfig config)
Filter initialization. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected int threshold
protected java.lang.String[] matches
protected java.lang.String[] excludes
protected boolean wildcards
| Constructor Detail |
|---|
public GzipFilter()
| Method Detail |
|---|
public void doFilter(javax.servlet.ServletRequest request,
javax.servlet.ServletResponse response,
javax.servlet.FilterChain chain)
throws javax.servlet.ServletException,
java.io.IOException
If browser does not support gzip, invokes resource normally.
doFilter in interface javax.servlet.Filterjavax.servlet.ServletException
java.io.IOException
public void init(javax.servlet.FilterConfig config)
throws javax.servlet.ServletException
init in interface javax.servlet.Filterjavax.servlet.ServletExceptionpublic void destroy()
destroy in interface javax.servlet.Filter
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||