|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.ujac.util.io.ClassPathResourceLoader
public class ClassPathResourceLoader
Title: ClassPathResourceLoader
Description: A resource loader which loads resources from the given class loader.
| Field Summary | |
|---|---|
static int |
IO_BUFFER_SIZE
The I/O buffer size. |
| Constructor Summary | |
|---|---|
ClassPathResourceLoader(ClassLoader classLoader)
Constructs a ClassPathResourceLoader instance with specific attributes. |
|
ClassPathResourceLoader(ClassLoader classLoader,
String pathPrefix)
Constructs a ClassPathResourceLoader instance with specific attributes. |
|
| Method Summary | |
|---|---|
byte[] |
loadResource(String location)
Loads a binary resource from the class 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 |
| Field Detail |
|---|
public static final int IO_BUFFER_SIZE
| Constructor Detail |
|---|
public ClassPathResourceLoader(ClassLoader classLoader)
throws IOException
classLoader - The class loader.
IOException - If the given rootDirectory does not exist or is no directory.
public ClassPathResourceLoader(ClassLoader classLoader,
String pathPrefix)
throws IOException
classLoader - The class loader.pathPrefix - The path prefix to prepend before the location.
IOException - If the given rootDirectory does not exist or is no directory.| Method Detail |
|---|
public byte[] loadResource(String location)
throws IOException
loadResource in interface ResourceLoaderlocation - The location of the resource.
IOException - In case the loading of the resource failed.public boolean resourceExists(String location)
resourceExists in interface ResourceLoaderlocation - The location of the resource.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||