|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.eclipse.actf.util.resources.DefaultResourceLocator
public class DefaultResourceLocator
a default implementation of the IResourceLocator interface for ACTF. Subclasses add special functionality for locating resources (e.g. .properties files) in particular environments.
Field Summary |
---|
Fields inherited from interface org.eclipse.actf.util.resources.IResourceLocator |
---|
ACTF_RESOURCES_PATHS_KEY, DEFAULT_ACTF_RESOURCES_DIR |
Constructor Summary | |
---|---|
DefaultResourceLocator()
|
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. |
protected InputStream |
getResourceAsBufferedStream(String id,
ClassLoader loader)
|
protected InputStream |
getResourceAsBufferedStream(String id,
String base,
String ext,
ClassLoader loader)
|
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. |
protected InputStream |
makeBufferedStream(InputStream is)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public DefaultResourceLocator()
Method Detail |
---|
public InputStream getResourceAsStream(String id)
getResourceAsStream
in interface IResourceLocator
id
- - id of resource
public InputStream getResourceAsStream(String id, ClassLoader loader)
getResourceAsStream
in interface IResourceLocator
id
- - id of resourceloader
- -- class loader to use
public InputStream getResourceAsStream(String id, String base, String ext, ClassLoader loader)
getResourceAsStream
in interface IResourceLocator
id
- - id of resourcebase
- - base pathext
- -extentioloader
- -- class loader to use
protected InputStream makeBufferedStream(InputStream is)
protected InputStream getResourceAsBufferedStream(String id, ClassLoader loader)
protected InputStream getResourceAsBufferedStream(String id, String base, String ext, ClassLoader loader)
public URL getResource(String name)
IResourceLocator
getResource
in interface IResourceLocator
name
- - name of resource
null
if
no resources with the given name could be foundClassLoader.getResource(String)
public URL[] getResources(String name)
IResourceLocator
getResources
in interface IResourceLocator
name
- - name of resource
null
if
no resources with the given name could be foundClassLoader.getResources(String)
public String getPath(String name)
IResourceLocator
getPath
in interface IResourceLocator
name
- - name of resource
null
if
no resources with the given name could be foundClassLoader.getResource(String)
public String[] getPaths(String name)
IResourceLocator
getPaths
in interface IResourceLocator
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 |