com.sun.jersey.api.container.filter
Class GZIPContentEncodingFilter

java.lang.Object
  extended by com.sun.jersey.api.container.filter.GZIPContentEncodingFilter
All Implemented Interfaces:
ContainerRequestFilter, ContainerResponseFilter

public final class GZIPContentEncodingFilter
extends java.lang.Object
implements ContainerRequestFilter, ContainerResponseFilter

A GZIP content encoding filter.

If the request contains a Content-Encoding header of "gzip" then the request entity (if any) is uncompressed using gzip.

If the request contains a Accept-Encoding header that contains "gzip" then the response entity (if any) is compressed using gzip and a Content-Encoding header of "gzip" is added to the response.

Author:
Paul.Sandoz@Sun.Com

Constructor Summary
GZIPContentEncodingFilter()
           
 
Method Summary
 ContainerRequest filter(ContainerRequest request)
          Filter the request.
 ContainerResponse filter(ContainerRequest request, ContainerResponse response)
          Filter the response.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GZIPContentEncodingFilter

public GZIPContentEncodingFilter()
Method Detail

filter

public ContainerRequest filter(ContainerRequest request)
Description copied from interface: ContainerRequestFilter
Filter the request.

An implementation may modify the state of the request or create a new instance.

Specified by:
filter in interface ContainerRequestFilter
Parameters:
request - the request.
Returns:
the request.

filter

public ContainerResponse filter(ContainerRequest request,
                                ContainerResponse response)
Description copied from interface: ContainerResponseFilter
Filter the response.

An implementation may modify the state of the response or return a new instance.

Specified by:
filter in interface ContainerResponseFilter
Parameters:
request - the request.
response - the response.
Returns:
the response.


Copyright © 2008 Sun Microsystems, Inc. All Rights Reserved.