    All Packages  Class Hierarchy  This Package  Previous  Next  Index

# Class w3c.jigsaw.filters.GZIPFilter

    java.lang.Object
       |
       +----w3c.tools.store.AttributeHolder
               |
               +----w3c.tools.store.Resource
                       |
                       +----w3c.tools.store.ResourceFrame
                               |
                               +----w3c.jigsaw.resources.ResourceFilter
                                       |
                                       +----w3c.jigsaw.filters.GZIPFilter

public class GZIPFilter
extends ResourceFilter

This filter will compress the content of replies using GZIP. Compression is done on the fly. This assumes that you're really on a slow link, where you have lots of CPU, but not much bandwidth.

A nifty usage for that filter, is to plug it on top of a `w3c.jigsaw.proxy.ProxyDirectory`, in which case it will compress the data when it flies out of the proxy.

##

ATTR_MIME_TYPES
  Attribute index - List of MIME type that we can compress
types
  The set of MIME types we are allowed to compress.

##

GZIPFilter()

##

getMimeTypes()
  Get the set of MIME types to match:
outgoingFilter(Request, Reply)
  Simplified API to the outgoing filter metho.
setValue(int, Object)
  Catch the setting of mime types to compress.

##

ATTR_MIME_TYPES

     protected static int ATTR_MIME_TYPES

  Attribute index - List of MIME type that we can compress

types

     protected MimeType types[]

  The set of MIME types we are allowed to compress.

##

GZIPFilter

     public GZIPFilter()

##

setValue

     public void setValue(int idx,
                          Object value)

  Catch the setting of mime types to compress.

  Parameters:
    idx - The attribute being set.
    val - The new attribute value.
  Overrides:
    setValue in class Resource

getMimeTypes

     public synchronized MimeType[] getMimeTypes()

  Get the set of MIME types to match:

  Returns:
    An array of MimeType instances.

outgoingFilter

     public Reply outgoingFilter(Request request,
                                 Reply reply) throws HTTPException

  Simplified API to the outgoing filter metho.

  Overrides:
    outgoingFilter in class ResourceFilter

    All Packages  Class Hierarchy  This Package  Previous  Next  Index