public class URLReference
extends java.lang.Object
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getFullURLSpec()
Get the full URL Spec
|
static URLReference |
getInstance(java.net.URL possibleRoot,
java.lang.String fullURLSpec)
Create a new reference testing whether the url spec is rooted in the root.
|
java.lang.String |
getURLSpec()
Get the URL spec which is relative to the root if possible and absolute if not
|
static URLReference[] |
getValidReferences(java.net.URL possibleRoot,
java.lang.String[] urlSpecs)
Generate and return URL References for all url Specs which are valid
|
boolean |
isRooted()
Test whether the URL Spec is rooted in the possible root
|
static boolean |
isRootedIn(java.io.File directory,
java.io.File file)
Test whether the file is rooted in the directory
|
static boolean |
isRootedIn(java.net.URL rootURL,
java.lang.String urlSpec)
Test whether the URL spec is rooted in the specified root URL
|
static boolean |
isRootedIn(java.net.URL rootURL,
java.net.URL url)
Test whether the URL is rooted in the specified root URL
|
boolean |
isValid()
Test whether the URL spec represents a valid file
|
java.lang.String |
toString()
Overridden to return the URL spec
|
public static URLReference getInstance(java.net.URL possibleRoot, java.lang.String fullURLSpec)
possibleRoot
- possible root for the specified full URL specfullURLSpec
- full URL spec to representpublic java.lang.String getFullURLSpec()
public java.lang.String getURLSpec()
public static boolean isRootedIn(java.io.File directory, java.io.File file)
public static boolean isRootedIn(java.net.URL rootURL, java.net.URL url)
public static boolean isRootedIn(java.net.URL rootURL, java.lang.String urlSpec)
public boolean isRooted()
public static URLReference[] getValidReferences(java.net.URL possibleRoot, java.lang.String[] urlSpecs)
public boolean isValid()
public java.lang.String toString()
toString
in class java.lang.Object