All Packages Class Hierarchy This Package Previous Next Index
Class com.kvisco.net.URIUtils
com.kvisco.net.URIUtils
- public class URIUtils
A utility class for URI handling
- Author:
- Keith Visco
-
URIUtils()
-
-
getDocumentBase(String)
- Returns the document base of the href argument
-
getInputStream(String, String)
- Returns an InputStream for the file represented by the href
argument
-
resolveHref(String, String)
-
URIUtils
public URIUtils()
getInputStream
public static InputStream getInputStream(String href,
String documentBase) throws FileNotFoundException, IOException
- Returns an InputStream for the file represented by the href
argument
- Parameters:
- 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.
- Returns:
- an InputStream to the desired resource
- Throws: FileNotFoundException
- when the file could not be
found
getDocumentBase
public static String getDocumentBase(String href)
- Returns the document base of the href argument
- Returns:
- the document base of the given href
resolveHref
public static String resolveHref(String href,
String documentBase)
All Packages Class Hierarchy This Package Previous Next Index