Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.newdawn.slick.util
Class ResourceLoader

    java.lang.Object
      org.newdawn.slick.util.ResourceLoader

    public class ResourceLoader

extends java.lang.Object

A simple wrapper around resource loading should anyone decide to change their minds how this is meant to work in the future.

Author:
  Kevin Glass

Constructor Summary
`ResourceLoader()`

Method Summary
`static void` | `addResourceLocation(ResourceLocation location)` Add a location that will be searched for resources
`static java.net.URL` | `getResource(java.lang.String ref)` Get a resource as a URL
`static java.io.InputStream` | `getResourceAsStream(java.lang.String ref)` Get a resource
`static void` | `removeAllResourceLocations()` Remove all the locations, no resources will be found until new locations have been added
`static void` | `removeResourceLocation(ResourceLocation location)` Remove a location that will be no longer be searched for resources
`static boolean` | `resourceExists(java.lang.String ref)` Check if a resource is available from any given resource loader

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### ResourceLoader

    public ResourceLoader()

Method Detail

### addResourceLocation

    public static void addResourceLocation(ResourceLocation location)

  Add a location that will be searched for resources

  Parameters:
    `location` - The location that will be searched for resoruces

### removeResourceLocation

    public static void removeResourceLocation(ResourceLocation location)

  Remove a location that will be no longer be searched for resources

  Parameters:
    `location` - The location that will be removed from the search list

### removeAllResourceLocations

    public static void removeAllResourceLocations()

  Remove all the locations, no resources will be found until new locations have been added

### getResourceAsStream

    public static java.io.InputStream getResourceAsStream(java.lang.String ref)

  Get a resource

  Parameters:
    `ref` - The reference to the resource to retrieve
  Returns:
    A stream from which the resource can be read

### resourceExists

    public static boolean resourceExists(java.lang.String ref)

  Check if a resource is available from any given resource loader

  Parameters:
    `ref` - A reference to the resource that should be checked
  Returns:
    True if the resource can be located

### getResource

    public static java.net.URL getResource(java.lang.String ref)

  Get a resource as a URL

  Parameters:
    `ref` - The reference to the resource to retrieve
  Returns:
    A URL from which the resource can be read

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2006 New Dawn Software. All Rights Reserved.