Package com.jme3.util.res
Interface ResourceLoader
public interface ResourceLoader
-
Method Summary
Modifier and TypeMethodDescriptiongetResource
(String path, Class<?> parent) Finds the resource with the given name relative to the given parent class or to the root if the parent is null.getResourceAsStream
(String path, Class<?> parent) Finds the resource with the given name relative to the given parent class or to the root if the parent is null.getResources
(String path) Finds all resources with the given name.
-
Method Details
-
getResource
Finds the resource with the given name relative to the given parent class or to the root if the parent is null.- Parameters:
path
- The resource nameparent
- Optional parent class- Returns:
- The resource URL or null if not found
-
getResourceAsStream
Finds the resource with the given name relative to the given parent class or to the root if the parent is null.- Parameters:
path
- The resource nameparent
- Optional parent class- Returns:
- An input stream to the resource or null if not found
-
getResources
Finds all resources with the given name.- Parameters:
path
- The resource name- Returns:
- An enumeration of
objects for the resource. If no resources could be found, the enumeration will be empty.URL
- Throws:
IOException
- If I/O errors occurIOException
-