|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnet.officefloor.plugin.servlet.resource.ClassPathResourceLocator
public class ClassPathResourceLocator
ResourceLocator for the class path.
| Constructor Summary | |
|---|---|
ClassPathResourceLocator(String classPathPrefix,
ClassLoader classLoader,
String... defaultDirectoryFileNames)
Initiate. |
|
| Method Summary | |
|---|---|
URL |
getResource(String resourcePath)
Obtains the URL for the resource. |
InputStream |
getResourceAsStream(String resourcePath)
Obtains the InputStream to the contents of the resource. |
Set<String> |
getResourceChildren(String resourcePath)
Obtains the direct children for the resource. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ClassPathResourceLocator(String classPathPrefix,
ClassLoader classLoader,
String... defaultDirectoryFileNames)
classPathPrefix - Class path prefix.classLoader - ClassLoader to use to locate resources.defaultDirectoryFileNames - Names of the default files within a directory.| Method Detail |
|---|
public Set<String> getResourceChildren(String resourcePath)
ResourceLocator
getResourceChildren in interface ResourceLocatorresourcePath - Path to the resource.
public URL getResource(String resourcePath)
throws MalformedURLException
ResourceLocatorURL for the resource.
getResource in interface ResourceLocatorresourcePath - Path to the resource.
URL to the resource or null if no resource
at path.
MalformedURLException - If resource path is malformed.public InputStream getResourceAsStream(String resourcePath)
ResourceLocatorInputStream to the contents of the resource.
getResourceAsStream in interface ResourceLocatorresourcePath - Path to the resource.
InputStream to the contents of the resource or
null if no resource at path.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||