Class CompressFilter

  • All Implemented Interfaces:
    jakarta.servlet.Filter

    public class CompressFilter
    extends com.helger.servlet.filter.AbstractHttpServletFilter
    This is a generic filter that first tries to find whether "GZip" is supported, and if this fails, whether "Deflate" is supported. If none is supported, no compression will happen in this filter.
    Author:
    Philip Helger
    • Constructor Summary

      Constructors 
      Constructor Description
      CompressFilter()  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void doHttpFilter​(jakarta.servlet.http.HttpServletRequest aHttpRequest, jakarta.servlet.http.HttpServletResponse aHttpResponse, jakarta.servlet.FilterChain aChain)  
      void init()  
      • Methods inherited from class com.helger.servlet.filter.AbstractHttpServletFilter

        doFilter
      • Methods inherited from class com.helger.servlet.filter.AbstractServletFilter

        destroy, getFilterConfig, init, toString
    • Constructor Detail

      • CompressFilter

        public CompressFilter()
    • Method Detail

      • init

        @OverridingMethodsMustInvokeSuper
        public void init()
                  throws jakarta.servlet.ServletException
        Overrides:
        init in class com.helger.servlet.filter.AbstractServletFilter
        Throws:
        jakarta.servlet.ServletException
      • doHttpFilter

        public void doHttpFilter​(@Nonnull
                                 jakarta.servlet.http.HttpServletRequest aHttpRequest,
                                 @Nonnull
                                 jakarta.servlet.http.HttpServletResponse aHttpResponse,
                                 @Nonnull
                                 jakarta.servlet.FilterChain aChain)
                          throws IOException,
                                 jakarta.servlet.ServletException
        Specified by:
        doHttpFilter in class com.helger.servlet.filter.AbstractHttpServletFilter
        Throws:
        IOException
        jakarta.servlet.ServletException