org.apache.myfaces.renderkit.html.util
Class DefaultResourceProvider

java.lang.Object
  extended by org.apache.myfaces.renderkit.html.util.DefaultResourceProvider
All Implemented Interfaces:
ResourceProvider

public class DefaultResourceProvider
extends Object
implements ResourceProvider

A class which provide the resource using the standard class.getResource lookup stuff.

Version:
$Revision: 673833 $ $Date: 2008-07-03 16:58:05 -0500 (Thu, 03 Jul 2008) $
Author:
imario (latest modification by $Author: skitching $)

Constructor Summary
DefaultResourceProvider(Class clazz)
           
 
Method Summary
 boolean exists(javax.servlet.ServletContext context, String resource)
          check if the resource exists
 int getContentLength(javax.servlet.ServletContext context, String resource)
          get the content length of the resource
 String getEncoding(javax.servlet.ServletContext context, String resource)
          get resource encoding
 InputStream getInputStream(javax.servlet.ServletContext context, String resource)
          get the input stream of the resource
 long getLastModified(javax.servlet.ServletContext context, String resource)
          get the last modified time of the resource
protected  URL getResource(String resource)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultResourceProvider

public DefaultResourceProvider(Class clazz)
Method Detail

getResource

protected URL getResource(String resource)

exists

public boolean exists(javax.servlet.ServletContext context,
                      String resource)
Description copied from interface: ResourceProvider
check if the resource exists

Specified by:
exists in interface ResourceProvider

getLastModified

public long getLastModified(javax.servlet.ServletContext context,
                            String resource)
                     throws IOException
Description copied from interface: ResourceProvider
get the last modified time of the resource

Specified by:
getLastModified in interface ResourceProvider
Throws:
IOException

getContentLength

public int getContentLength(javax.servlet.ServletContext context,
                            String resource)
                     throws IOException
Description copied from interface: ResourceProvider
get the content length of the resource

Specified by:
getContentLength in interface ResourceProvider
Throws:
IOException

getInputStream

public InputStream getInputStream(javax.servlet.ServletContext context,
                                  String resource)
                           throws IOException
Description copied from interface: ResourceProvider
get the input stream of the resource

Specified by:
getInputStream in interface ResourceProvider
Throws:
IOException

getEncoding

public String getEncoding(javax.servlet.ServletContext context,
                          String resource)
                   throws IOException
Description copied from interface: ResourceProvider
get resource encoding

Specified by:
getEncoding in interface ResourceProvider
Throws:
IOException


Copyright © 2012 The Apache Software Foundation. All Rights Reserved.