org.ipdr.ftp
Class URIUtils

java.lang.Object
  extended by org.ipdr.ftp.URIUtils

public class URIUtils
extends java.lang.Object

This class provides utility methods related to URL. One can get a URL object from a string and can get an InputStream object from a specified URL.


Constructor Summary
URIUtils()
           
 
Method Summary
static java.io.InputStream getFileStreamFromURL(java.lang.String urlString)
           This method returns the InputStream object for the file specified by the URL string.
static java.net.URL getURLFromString(java.lang.String urlString)
           This method returns the URL object for the string passed.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

URIUtils

public URIUtils()
Method Detail

getURLFromString

public static java.net.URL getURLFromString(java.lang.String urlString)
                                     throws IPDRFTPException

This method returns the URL object for the string passed. This is used by Consumer.

Parameters:
urlString - String containing the URL of a file.
Returns:
URL An object of URL class formed from the URL string.

Throws:
IPDRFTPException

getFileStreamFromURL

public static java.io.InputStream getFileStreamFromURL(java.lang.String urlString)
                                                throws IPDRFTPException

This method returns the InputStream object for the file specified by the URL string. This is a utility method

Parameters:
urlString - String containing the URL of a file.
Returns:
InputStream An InputStream for the file URL.

Throws:
IPDRFTPException