de.lessvoid.nifty.tools.resourceloader
Class ClasspathLocation

java.lang.Object
  extended by de.lessvoid.nifty.tools.resourceloader.ClasspathLocation
All Implemented Interfaces:
ResourceLocation

public class ClasspathLocation
extends Object
implements ResourceLocation

A resource location that searches the classpath

Author:
kevin

Constructor Summary
ClasspathLocation()
           
 
Method Summary
 URL getResource(String ref)
          Get a resource as a URL
 InputStream getResourceAsStream(String ref)
          Get a resource as an input stream
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ClasspathLocation

public ClasspathLocation()
Method Detail

getResource

public URL getResource(String ref)
Description copied from interface: ResourceLocation
Get a resource as a URL

Specified by:
getResource in interface ResourceLocation
Parameters:
ref - The reference to the resource to retrieve
Returns:
A stream from which the resource can be read
See Also:
org.newdawn.slick.util.ResourceLocation#getResource(java.lang.String)

getResourceAsStream

public InputStream getResourceAsStream(String ref)
Description copied from interface: ResourceLocation
Get a resource as an input stream

Specified by:
getResourceAsStream in interface ResourceLocation
Parameters:
ref - The reference to the resource to retrieve
Returns:
A stream from which the resource can be read or null if the resource can't be found in this location
See Also:
org.newdawn.slick.util.ResourceLocation#getResourceAsStream(java.lang.String)


Copyright © 2012. All Rights Reserved.