|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.tirix.anim8or.DefaultResourceLoader
public class DefaultResourceLoader
A facility for loading resources. This default ResourceLoader implementation simply tries to access the resources as files. This is sufficient in most cases. More advanced implementations may include: - looking for images/textures in a special directory, - getting the resources from a jar or a ZIP file, - getting the resources from the Applet resources, - etc.
$Log: DefaultResourceLoader.java,v $ Revision 1.1 2008/02/02 23:54:25 tirix Added a 'ResourceLoader' interface: enables to customize eg. texture loading.Copyright (C) 2008 Thierry Arnoux.
| Constructor Summary | |
|---|---|
DefaultResourceLoader(LoaderBase loaderBase)
|
|
| Method Summary | |
|---|---|
File |
getFile(String resourceName)
|
Image |
openImage(String resourceName)
Opens the image using the resource loader specific method. |
InputStream |
openResource(String resourceName)
Opens the resource using the resource loader specific method. |
InputStream |
openResource(URL url)
Opens the URL using the resource loader specific method. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public DefaultResourceLoader(LoaderBase loaderBase)
| Method Detail |
|---|
public File getFile(String resourceName)
throws IOException
IOException
public InputStream openResource(String resourceName)
throws IOException
Anim8orLoader.ResourceLoader
openResource in interface Anim8orLoader.ResourceLoaderresourceName - the name of the resource to be opened
IOException - if the resource cannot be accessed
public Image openImage(String resourceName)
throws IOException
Anim8orLoader.ResourceLoader
openImage in interface Anim8orLoader.ResourceLoaderresourceName - the name of the image resource to be opened
IOException - if the image resource cannot be accessed
public InputStream openResource(URL url)
throws IOException
Anim8orLoader.ResourceLoader
openResource in interface Anim8orLoader.ResourceLoaderurl - the URL of the resource to open.
IOException - if the resource cannot be accessed
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||