Class CompressionFilter

  • All Implemented Interfaces:
    javax.servlet.Filter

    public final class CompressionFilter
    extends Object
    implements javax.servlet.Filter
    Compression and Decompression filter
    • Field Detail

      • COMPRESSED_KEY

        public static final String COMPRESSED_KEY
        A request attribute is set under this key with a non-null value if this filter has applied compression to the response. Upstream filters may check for this flag. Note that if the response has been compressed, then it will be closed by the time this filter finishes as well.
        See Also:
        Constant Field Values
    • Constructor Detail

      • CompressionFilter

        public CompressionFilter()
    • Method Detail

      • init

        public void init​(javax.servlet.FilterConfig filterConfig)
                  throws javax.servlet.ServletException
        Specified by:
        init in interface javax.servlet.Filter
        Throws:
        javax.servlet.ServletException
      • doFilter

        public void doFilter​(javax.servlet.ServletRequest request,
                             javax.servlet.ServletResponse response,
                             javax.servlet.FilterChain chain)
                      throws IOException,
                             javax.servlet.ServletException
        Specified by:
        doFilter in interface javax.servlet.Filter
        Throws:
        IOException
        javax.servlet.ServletException
      • destroy

        public void destroy()
        Specified by:
        destroy in interface javax.servlet.Filter