|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.exolab.castor.net.util.URIUtils
public class URIUtils
A utility class for URI handling
| Constructor Summary | |
|---|---|
URIUtils()
|
|
| Method Summary | |
|---|---|
static String |
getDocumentBase(String href)
Returns the document base of the href argument |
static InputStream |
getInputStream(String href,
String documentBase)
Returns an InputStream for the file represented by the href argument |
static Reader |
getReader(String href,
String documentBase)
Returns a Reader for the file represented by the href argument |
static String |
getRelativeURI(String href)
Returns the relative URI of the href argument |
static String |
normalize(String absoluteURL)
This method removes "." or ".." from absolute URL. |
static String |
resolveAsString(String href,
String documentBase)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public URIUtils()
| Method Detail |
|---|
public static InputStream getInputStream(String href,
String documentBase)
throws FileNotFoundException,
IOException
href - the href of the file to get the input stream for.documentBase - the document base of the href argument, if it
is a relative href
set documentBase to null if there is none.
FileNotFoundException - when the file could not be
found
IOException
public static Reader getReader(String href,
String documentBase)
throws FileNotFoundException,
IOException
href - the href of the file to get the input stream for.documentBase - the document base of the href argument, if it
is a relative href
set documentBase to null if there is none.
FileNotFoundException - when the file could not be
found
IOExceptionpublic static String getDocumentBase(String href)
public static String getRelativeURI(String href)
public static String normalize(String absoluteURL)
throws MalformedURLException
absoluteURL - the absolute URI to normalize
MalformedURLException
public static String resolveAsString(String href,
String documentBase)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||