com.jme.util.resource
Class MultiFormatResourceLocator
java.lang.Object
com.jme.util.resource.SimpleResourceLocator
com.jme.util.resource.MultiFormatResourceLocator
- All Implemented Interfaces:
- ResourceLocator
public class MultiFormatResourceLocator
- extends SimpleResourceLocator
This class extends the behavior of the SimpleResourceLocator
by appending different file extensions
to the resource name, if it cannot find a resource with the extension specified in the path name.
- Author:
- Joshua Slack
Methods inherited from class java.lang.Object |
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
MultiFormatResourceLocator
public MultiFormatResourceLocator(java.net.URI baseDir)
MultiFormatResourceLocator
public MultiFormatResourceLocator(java.net.URL baseDir)
throws java.net.URISyntaxException
- Throws:
java.net.URISyntaxException
MultiFormatResourceLocator
public MultiFormatResourceLocator(java.net.URI baseDir,
java.lang.String... extensions)
MultiFormatResourceLocator
public MultiFormatResourceLocator(java.net.URL baseDir,
java.lang.String... extensions)
throws java.net.URISyntaxException
- Throws:
java.net.URISyntaxException
locateResource
public java.net.URL locateResource(java.lang.String resourceName)
- Description copied from interface:
ResourceLocator
- Locates a resource according to the strategy of the resource locator implementation (subclass).
- Specified by:
locateResource
in interface ResourceLocator
- Overrides:
locateResource
in class SimpleResourceLocator
- Parameters:
resourceName
- the name of the resource to locate; it this is a path it must be slash separated (no backslashes)
- Returns:
- a URL for the resource, null if the resource was not found
- See Also:
SimpleResourceLocator
,
MultiFormatResourceLocator
isTrySpecifiedFormatFirst
public boolean isTrySpecifiedFormatFirst()
setTrySpecifiedFormatFirst
public void setTrySpecifiedFormatFirst(boolean trySpecifiedFormatFirst)
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equals
in class SimpleResourceLocator