|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.ujac.util.io.CachedResourceLoader
public class CachedResourceLoader
Name: MultiResourceLoader
Description: A resource loader which caches the resources it loads
by a defined real ResourceLoader to reduce I/O.
Constructor Summary | |
---|---|
CachedResourceLoader(ResourceLoader resourceLoader)
Constructs a CachedResourceLoader instance with specific attributes. |
Method Summary | |
---|---|
void |
clearCache()
Clears the resource cache. |
byte[] |
loadResource(String location)
First checks the resource cache until the desired resource is really loaded by the defined loader. |
boolean |
resourceExists(String location)
Checks whether or not the desired resource exists. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public CachedResourceLoader(ResourceLoader resourceLoader)
resourceLoader
- The real resource loader.Method Detail |
---|
public byte[] loadResource(String location) throws IOException
loadResource
in interface ResourceLoader
location
- The location of the resource.
IOException
- In case the loading of the resource failed.ResourceLoader.loadResource(java.lang.String)
public boolean resourceExists(String location)
resourceExists
in interface ResourceLoader
location
- The location of the resource.
public void clearCache()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |