|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectde.hedenus.www.URIUtil
public class URIUtil
URI utilities.
Method Summary | |
---|---|
static java.lang.String |
getPath(java.lang.String uri)
Gets path of the URI or null if no path is detected. |
static java.lang.String |
getScheme(java.lang.String uri)
Returns the URI's scheme nor null if the URI has no legal scheme definition. |
static boolean |
isAbsolute(java.lang.String uri)
Tests wether the URI starts with a legal scheme, e.g. |
static boolean |
isLegalChar(char c)
Returns true if the character is a letter or digit or 'other legal character'. |
static boolean |
isLetterOrDigit(char c)
Returns true if the character is a letter or number. |
static boolean |
isOtherLegalChar(char c)
Returns true if the character is 'other legal character'. |
static boolean |
isSchemeChar(char c,
int index)
Returns true if the char is legal character for the scheme. |
static void |
main(java.lang.String[] args)
|
static java.lang.String |
resolve(java.lang.String relURI,
java.lang.String baseURI)
Resolves the relative URI against the base URI. |
static java.io.File |
toFile(java.lang.String uri)
Translates a file: URI to a file. |
static java.lang.String |
toURI(java.io.File file)
Translates a file to a file: URI with no specified host. |
static java.lang.String |
toURI(java.io.File file,
java.lang.String host)
Translates a file to a file: URI using the specified host name. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static java.lang.String resolve(java.lang.String relURI, java.lang.String baseURI)
relURI
is absolute, it is simply returned.
relURI
- the URI to be resolvedbaseURI
- the base URI against which the resolving is donepublic static java.lang.String getPath(java.lang.String uri)
null
if no path is detected.
public static boolean isAbsolute(java.lang.String uri)
http:
.
public static java.lang.String getScheme(java.lang.String uri)
null
if the URI has no legal scheme definition.
public static java.io.File toFile(java.lang.String uri)
file:
URI to a file.
The host name will be ignored.
public static java.lang.String toURI(java.io.File file)
file:
URI with no specified host.
public static java.lang.String toURI(java.io.File file, java.lang.String host)
file:
URI using the specified host name.
public static boolean isSchemeChar(char c, int index)
c
- the charindex
- the char's position in the URI stringpublic static boolean isLetterOrDigit(char c)
public static boolean isLegalChar(char c)
public static boolean isOtherLegalChar(char c)
public static void main(java.lang.String[] args)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |