org.newdawn.slick.util
Class ClasspathLocation

java.lang.Object
  extended by org.newdawn.slick.util.ClasspathLocation
All Implemented Interfaces:
ResourceLocation

public class ClasspathLocation
extends java.lang.Object
implements ResourceLocation

A resource location that searches the classpath

Author:
kevin

Constructor Summary
ClasspathLocation()
           
 
Method Summary
 java.net.URL getResource(java.lang.String ref)
          Get a resource as a URL
 java.io.InputStream getResourceAsStream(java.lang.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 java.net.URL getResource(java.lang.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 URL from which the resource can be read
See Also:
ResourceLocation.getResource(java.lang.String)

getResourceAsStream

public java.io.InputStream getResourceAsStream(java.lang.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:
ResourceLocation.getResourceAsStream(java.lang.String)


Copyright © 2006 New Dawn Software. All Rights Reserved.