org.newdawn.slick.util
Class FileSystemLocation

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

public class FileSystemLocation
extends java.lang.Object
implements ResourceLocation

A resource loading location that searches somewhere on the classpath

Author:
kevin

Constructor Summary
FileSystemLocation(java.io.File root)
          Create a new resoruce location based on the file system
 
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

FileSystemLocation

public FileSystemLocation(java.io.File root)
Create a new resoruce location based on the file system

Parameters:
root - The root of the file system to search
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(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(String)


Copyright © 2006 New Dawn Software. All Rights Reserved.