org.apache.myfaces.commons.resourcehandler
Class GZIPResourceLoader
java.lang.Object
org.apache.myfaces.commons.resourcehandler.resource.ResourceLoader
org.apache.myfaces.commons.resourcehandler.resource.ResourceLoaderWrapper
org.apache.myfaces.commons.resourcehandler.GZIPResourceLoader
- All Implemented Interfaces:
- javax.faces.FacesWrapper<ResourceLoader>
public class GZIPResourceLoader
- extends ResourceLoaderWrapper
- Author:
- Leonardo Uribe, Jakob Korherr
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
COMPRESSED_FILES_MAP
public static final String COMPRESSED_FILES_MAP
- See Also:
- Constant Field Values
GZIPResourceLoader
public GZIPResourceLoader(ResourceLoader delegate,
ExtendedDefaultResourceHandlerSupport extendedDefaultResourceHandlerSupport)
initialize
protected void initialize()
getResourceURL
public URL getResourceURL(ResourceMeta resourceMeta)
- Description copied from class:
ResourceLoader
- Return the max available version found (if exists) or
return null if no version available.
- Overrides:
getResourceURL
in class ResourceLoaderWrapper
getResourceInputStream
public InputStream getResourceInputStream(ResourceMeta resourceMeta)
- Overrides:
getResourceInputStream
in class ResourceLoaderWrapper
resourceExists
public boolean resourceExists(ResourceMeta resourceMeta)
- Overrides:
resourceExists
in class ResourceLoaderWrapper
createCompressedFileVersion
protected void createCompressedFileVersion(javax.faces.context.FacesContext facesContext,
ResourceMeta resourceMeta,
File target)
- Uses GZIPOutputStream to compress this resource.
It will be stored where getCompressedFile() points to.
Note that the resource really must be compressable (isCompressable() must return true).
getWrapped
public ResourceLoader getWrapped()
Copyright © 2007-2011 The Apache Software Foundation. All Rights Reserved.