net.sf.jasperreports.jsf.resource.providers
Class ContextResource

java.lang.Object
  extended by net.sf.jasperreports.jsf.resource.AbstractResource
      extended by net.sf.jasperreports.jsf.resource.providers.ContextResource
All Implemented Interfaces:
Resource

public final class ContextResource
extends AbstractResource
implements Resource

The Class ContextResourceLoader.


Constructor Summary
protected ContextResource(String name, ExternalContext servletContext)
          Instantiates a new context resource loader.
 
Method Summary
 InputStream getInputStream()
          Obtains an InputStream which can be used to read the resource data.
 URL getLocation()
          Obtains the URL location of this resource
 String getPath()
          The path part of the resource
 
Methods inherited from class net.sf.jasperreports.jsf.resource.AbstractResource
getName
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface net.sf.jasperreports.jsf.resource.Resource
getName
 

Constructor Detail

ContextResource

protected ContextResource(String name,
                          ExternalContext servletContext)
Instantiates a new context resource loader.

Parameters:
servletContext - the servlet context
Method Detail

getLocation

public URL getLocation()
                throws MalformedURLException
Description copied from interface: Resource
Obtains the URL location of this resource

Specified by:
getLocation in interface Resource
Returns:
The location of the resource
Throws:
MalformedURLException

getInputStream

public InputStream getInputStream()
Description copied from interface: Resource
Obtains an InputStream which can be used to read the resource data.

Users of this stream are responsible of closing it

Specified by:
getInputStream in interface Resource
Returns:
An InputStream to read the resource data

getPath

public String getPath()
Description copied from interface: Resource
The path part of the resource

Specified by:
getPath in interface Resource
Returns:


Copyright © 2009 SourceForge.net. All Rights Reserved.