|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface IResourceLocator
A IResourceLocator is used to retreave streams for named resources. It is meant to enhance
the normal functionality of ClassLoader.getResourceAsStream()
in contexts in which classpaths can be difficult to resolve
or are unknown.
Field Summary | |
---|---|
static String |
ACTF_RESOURCES_PATHS_KEY
|
static String |
DEFAULT_ACTF_RESOURCES_DIR
|
Method Summary | |
---|---|
String |
getPath(String name)
find the Path with the given name. |
String[] |
getPaths(String name)
find the paths with the given name. |
URL |
getResource(String name)
find the resource with the given name. |
InputStream |
getResourceAsStream(String id)
get the resource with the given id as a stream and using the class loader that loaded this IResourceLocator instance. |
InputStream |
getResourceAsStream(String id,
ClassLoader loader)
get the resource corresponding to the given id as a stream using the specified class loader. |
InputStream |
getResourceAsStream(String id,
String base,
String ext,
ClassLoader loader)
get the resource corresponding to the given id as a stream using the specified class loader. |
URL[] |
getResources(String name)
find the resources with the given name. |
Field Detail |
---|
static final String DEFAULT_ACTF_RESOURCES_DIR
static final String ACTF_RESOURCES_PATHS_KEY
Method Detail |
---|
InputStream getResourceAsStream(String id)
id
- - id of resource
InputStream getResourceAsStream(String id, ClassLoader loader)
id
- - id of resourceloader
- -- class loader to use
InputStream getResourceAsStream(String id, String base, String ext, ClassLoader loader)
id
- - id of resourceloader
- -- class loader to usebase
- - base pathext
- -extentio
URL getResource(String name)
name
- - name of resource
null
if
no resources with the given name could be foundClassLoader.getResource(String)
URL[] getResources(String name)
name
- - name of resource
null
if
no resources with the given name could be foundClassLoader.getResources(String)
String getPath(String name)
name
- - name of resource
null
if
no resources with the given name could be foundClassLoader.getResource(String)
String[] getPaths(String name)
name
- - name of resource
null
if
no resources with the given name could be foundClassLoader.getResources(String)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |