net.sf.jasperreports.jsf.resource
Class ClasspathResource

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

public final class ClasspathResource
extends Object
implements Resource


Field Summary
static String PREFIX
           
 
Constructor Summary
protected ClasspathResource(String name, ClassLoader classLoader)
           
 
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 getName()
          Name of the resource.
 String getPath()
          The path part of the resource.
 String getSimpleName()
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

PREFIX

public static final String PREFIX
See Also:
Constant Field Values
Constructor Detail

ClasspathResource

protected ClasspathResource(String name,
                            ClassLoader classLoader)
Method Detail

getName

public String getName()
Description copied from interface: Resource
Name of the resource.

Specified by:
getName in interface Resource

getSimpleName

public String getSimpleName()
Specified by:
getSimpleName in interface Resource

getInputStream

public InputStream getInputStream()
                           throws IOException
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
Throws:
IOException

getLocation

public URL getLocation()
                throws IOException
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:
IOException

getPath

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

Specified by:
getPath in interface Resource
Returns:
the absolute path to the resource.

toString

public String toString()
Overrides:
toString in class Object


Copyright © 2011 SourceForge.net. All Rights Reserved.