| java.lang.Object org.exolab.castor.net.util.URIUtils
URIUtils | public class URIUtils (Code) | | A utility class for URI handling
author: Keith Visco |
Method Summary | |
public static String | getDocumentBase(String href) | public static InputStream | getInputStream(String href, String documentBase) Returns an InputStream for the file represented by the href
argument
Parameters: href - the href of the file to get the input stream for. Parameters: documentBase - the document base of the href argument, if itis a relative hrefset documentBase to null if there is none. | public static Reader | getReader(String href, String documentBase) Returns a Reader for the file represented by the href
argument
Parameters: href - the href of the file to get the input stream for. Parameters: documentBase - the document base of the href argument, if itis a relative hrefset documentBase to null if there is none. | public static String | getRelativeURI(String href) | public static String | normalize(String absoluteURL) This method removes "." or ".." from absolute URL. | public static String | resolveAsString(String href, String documentBase) |
getDocumentBase | public static String getDocumentBase(String href)(Code) | | Returns the document base of the href argument
the document base of the given href |
getReader | public static Reader getReader(String href, String documentBase) throws java.io.FileNotFoundException, java.io.IOException(Code) | | Returns a Reader for the file represented by the href
argument
Parameters: href - the href of the file to get the input stream for. Parameters: documentBase - the document base of the href argument, if itis a relative hrefset documentBase to null if there is none. an InputStream to the desired resource exception: java.io.FileNotFoundException - when the file could not befound |
getRelativeURI | public static String getRelativeURI(String href)(Code) | | Returns the relative URI of the href argument
the relative URI the given href |
normalize | public static String normalize(String absoluteURL) throws MalformedURLException(Code) | | This method removes "." or ".." from absolute URL.
I needed this method because the JDK doesn't do this
automatically when creating URLs.
Parameters: absoluteURL - the absolute URI to normalize |
|
|