com.guiseframework.platform.web
Class GuiseHTTPServlet.CSSResource

java.lang.Object
  extended by com.globalmentor.net.DefaultResource
      extended by com.guiseframework.platform.web.GuiseHTTPServlet.CSSResource
All Implemented Interfaces:
com.globalmentor.net.Resource, java.lang.Comparable<com.globalmentor.net.Resource>
Direct Known Subclasses:
GuiseHTTPServlet.IE6CSSResource
Enclosing class:
GuiseHTTPServlet

protected static class GuiseHTTPServlet.CSSResource
extends com.globalmentor.net.DefaultResource

A resource that represents a CSS file, decorating an existing resource. This version compresses resources of type text/css.

Author:
Garret Wilson

Field Summary
 
Fields inherited from interface com.globalmentor.net.Resource
URI_PROPERTY_NAME
 
Constructor Summary
GuiseHTTPServlet.CSSResource(com.globalmentor.net.http.DefaultHTTPServlet.HTTPServletResource resource)
          HTTP servlet resource constructor.
 
Method Summary
protected  byte[] loadBytes(HttpServletRequest request)
          Loads bytes from the requested resource.
protected  CSSStylesheet loadStylesheet(HttpServletRequest request, GuiseCSSProcessor cssProcessor)
          Loads a CSS stylesheet from the requested resource.
 
Methods inherited from class com.globalmentor.net.DefaultResource
compareTo, equals, getURI, hashCode, setURI, toString, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface com.globalmentor.net.Resource
getURI
 

Constructor Detail

GuiseHTTPServlet.CSSResource

public GuiseHTTPServlet.CSSResource(com.globalmentor.net.http.DefaultHTTPServlet.HTTPServletResource resource)
HTTP servlet resource constructor.

Parameters:
resource - The decorated HTTP servlet resource.
Throws:
java.lang.IllegalArgumentException - if the given resource is null.
Method Detail

loadStylesheet

protected CSSStylesheet loadStylesheet(HttpServletRequest request,
                                       GuiseCSSProcessor cssProcessor)
                                throws java.io.IOException
Loads a CSS stylesheet from the requested resource.

Parameters:
request - The HTTP request in response to which the bytes are being retrieved.
cssProcessor - The processor to use in processing the stylesheet.
Returns:
A stylesheet object representing the resource.
Throws:
java.io.IOException - if there is an error retrieving the bytes.

loadBytes

protected byte[] loadBytes(HttpServletRequest request)
                    throws java.io.IOException
Loads bytes from the requested resource.

Parameters:
request - The HTTP request in response to which the bytes are being retrieved.
Returns:
The bytes that constitute the resource.
Throws:
java.io.IOException - if there is an error retrieving the bytes.


Copyright © 2005-2010 GlobalMentor, Inc. All Rights Reserved.