|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.ujac.util.io.FileResourceLoader
public class FileResourceLoader
Title: FileResourceLoader
Description: A resource loader which loads resources from a given directory.
Field Summary | |
---|---|
static int |
IO_BUFFER_SIZE
The I/O buffer size. |
Constructor Summary | |
---|---|
FileResourceLoader(File rootDirectory)
Constructs a FileResourceLoader instance with specific attributes. |
|
FileResourceLoader(String rootPath)
Constructs a FileResourceLoader instance with specific attributes. |
Method Summary | |
---|---|
byte[] |
loadResource(String location)
Loads a binary resource from the file system. |
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 |
Field Detail |
---|
public static final int IO_BUFFER_SIZE
Constructor Detail |
---|
public FileResourceLoader(String rootPath) throws IOException
rootPath
- The root directory location.
IOException
- If the given rootDirectory does not exist or is no directory.public FileResourceLoader(File rootDirectory) throws IOException
rootDirectory
- The root directory.
IOException
- If the given rootDirectory does not exist or is no directory.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.public boolean resourceExists(String location)
resourceExists
in interface ResourceLoader
location
- The location of the resource.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |