## org.mortbay.servlet.jetty
Class IncludableGzipFilter

    java.lang.Object
      org.mortbay.servlet.UserAgentFilter
          org.mortbay.servlet.GzipFilter
              org.mortbay.servlet.jetty.IncludableGzipFilter

All Implemented Interfaces:
  javax.servlet.Filter

    public class IncludableGzipFilter

extends GzipFilter

Includable GZip Filter. This extension to the `GzipFilter` that uses Jetty APIs to allow headers to be set during calls to `RequestDispatcher.include(javax.servlet.ServletRequest, javax.servlet.ServletResponse)`. This allows the gzip filter to function correct during includes and to make a decision to gzip or not at the time the buffer fills and on the basis of all response headers. If the init parameter "uncheckedPrintWriter" is set to "true", then the PrintWriter used by the wrapped getWriter will be `UncheckedPrintWriter`.

Nested Class Summary
`class` `IncludableGzipFilter.IncludableGzipStream`
`class` `IncludableGzipFilter.IncludableResponseWrapper`

Nested classes/interfaces inherited from class org.mortbay.servlet.GzipFilter
`GzipFilter.GZIPResponseWrapper, GzipFilter.GzipStream`

Field Summary

Fields inherited from class org.mortbay.servlet.GzipFilter
`_bufferSize, _excluded, _mimeTypes, _minGzipSize`

Constructor Summary
`IncludableGzipFilter()`

Method Summary
`void` `init(javax.servlet.FilterConfig filterConfig)`
`protected GzipFilter.GZIPResponseWrapper` `newGZIPResponseWrapper(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)`
`protected java.io.PrintWriter` `newWriter(java.io.OutputStream out, java.lang.String encoding)`

Methods inherited from class org.mortbay.servlet.GzipFilter
`destroy, doFilter`

Methods inherited from class org.mortbay.servlet.UserAgentFilter
`getUserAgent, getUserAgent`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### IncludableGzipFilter

    public IncludableGzipFilter()

Method Detail

### init

    public void init(javax.servlet.FilterConfig filterConfig)
              throws javax.servlet.ServletException

  Specified by:
    `init` in interface `javax.servlet.Filter`
  Overrides:
    `init` in class `GzipFilter`
  Throws:
    `javax.servlet.ServletException`

### newGZIPResponseWrapper

    protected GzipFilter.GZIPResponseWrapper newGZIPResponseWrapper(javax.servlet.http.HttpServletRequest request,
                                                                    javax.servlet.http.HttpServletResponse response)

  Overrides:
    `newGZIPResponseWrapper` in class `GzipFilter`

### newWriter

    protected java.io.PrintWriter newWriter(java.io.OutputStream out,
                                            java.lang.String encoding)
                                     throws java.io.UnsupportedEncodingException

  Overrides:
    `newWriter` in class `GzipFilter`
  Throws:
    `java.io.UnsupportedEncodingException`

Copyright © 1995-2010 Mort Bay Consulting. All Rights Reserved.