com.strangegizmo.filter
Class GzipFilter
java.lang.Object
|
+--com.strangegizmo.filter.GzipFilter
- public class GzipFilter
- extends java.lang.Object
- implements javax.servlet.Filter
The GzipFilter processes requests with an Accept-Encoding of `gzip'
and compresses the data.
Field Summary |
static java.lang.String |
inUseAttributeName_
The attribute that is set on the ServletRequest object to
indicate that the GzipFilter is in use for this request. |
Method Summary |
void |
destroy()
Destroys the filter. |
void |
doFilter(javax.servlet.ServletRequest request,
javax.servlet.ServletResponse response,
javax.servlet.FilterChain chain)
Process a new Request/Response pair, wrapping the Response in a
GzipFilterResponse if the response data can be compresses. |
void |
init(javax.servlet.FilterConfig filterConfig)
Initializes the filter. |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
inUseAttributeName_
public static final java.lang.String inUseAttributeName_
- The attribute that is set on the ServletRequest object to
indicate that the GzipFilter is in use for this request.
GzipFilter
public GzipFilter()
init
public void init(javax.servlet.FilterConfig filterConfig)
- Initializes the filter.
- Specified by:
- init in interface javax.servlet.Filter
destroy
public void destroy()
- Destroys the filter.
- Specified by:
- destroy in interface javax.servlet.Filter
doFilter
public void doFilter(javax.servlet.ServletRequest request,
javax.servlet.ServletResponse response,
javax.servlet.FilterChain chain)
throws java.io.IOException,
javax.servlet.ServletException
- Process a new Request/Response pair, wrapping the Response in a
GzipFilterResponse if the response data can be compresses.
- Specified by:
- doFilter in interface javax.servlet.Filter