|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.jibx.util.ClasspathUrlExtender
public class ClasspathUrlExtender
Support class for accessing resources using classpath URLs. The buildURL(URL, String) method must be used to
construct a URL for a resource on the classpath, and the setClassLoader(ClassLoader) method must first be
used to set the classloader if it differs from the classloader used for loading this class.
| Nested Class Summary | |
|---|---|
static class |
ClasspathUrlExtender.ClasspathHandler
Handler for opening a connection to a resource from the classpath. |
| Field Summary | |
|---|---|
static String |
CLASSPATH_PROTOCOL
Protocol name for classpath access. |
| Constructor Summary | |
|---|---|
ClasspathUrlExtender()
|
|
| Method Summary | |
|---|---|
static URL |
buildURL(URL base,
String path)
Construct a URL which may represent a resource from the classpath. |
static boolean |
isClasspathUrl(String url)
Check if a URL string represents a resource from the classpath. |
static void |
setClassLoader(ClassLoader loader)
Set the classloader to be used for accessing resources. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final String CLASSPATH_PROTOCOL
| Constructor Detail |
|---|
public ClasspathUrlExtender()
| Method Detail |
|---|
public static void setClassLoader(ClassLoader loader)
loader - public static boolean isClasspathUrl(String url)
url -
true if classpath resource, false if not
public static URL buildURL(URL base,
String path)
throws MalformedURLException
base - URL base for relative referencespath - resource path
MalformedURLException - if not a valid URL format
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||