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

Constructor Index

 o URIUtils()

Method Index

 o getDocumentBase(String)
Returns the document base of the href argument
 o getInputStream(String, String)
Returns an InputStream for the file represented by the href argument
 o resolveHref(String, String)

Constructors

 o URIUtils
 public URIUtils()

Methods

 o 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
 o getDocumentBase
 public static String getDocumentBase(String href)
Returns the document base of the href argument

Returns:
the document base of the given href
 o resolveHref
 public static String resolveHref(String href,
                                  String documentBase)

All Packages  Class Hierarchy  This Package  Previous  Next  Index