edu.northwestern.at.utils.net.url
Class ParseURL

java.lang.Object
  extended by edu.northwestern.at.utils.net.url.ParseURL

public class ParseURL
extends java.lang.Object

Utility methods for extracting portions of a URL.


Constructor Summary
ParseURL()
           
 
Method Summary
static java.lang.String getDirectory(java.lang.String urlString)
          Get direcctory from URL.
static java.lang.String getFile(java.lang.String urlString)
          Get file from URL.
static java.lang.String getHost(java.lang.String urlString)
          Get host from URL string.
static java.lang.String getProtocol(java.lang.String urlString)
          Get protocol from URL string.
static java.net.URL makeURL(java.lang.String urlString)
          Create URL from a string.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ParseURL

public ParseURL()
Method Detail

makeURL

public static java.net.URL makeURL(java.lang.String urlString)
Create URL from a string.

Parameters:
urlString - URL string to parse.
Returns:
The URL, or null if urlString contains invalid URL specification.

getProtocol

public static java.lang.String getProtocol(java.lang.String urlString)
Get protocol from URL string.

Parameters:
urlString - URL string.
Returns:
Protocol for this URL.

getHost

public static java.lang.String getHost(java.lang.String urlString)
Get host from URL string.

Parameters:
urlString - URL string.
Returns:
Host for this URL.

getDirectory

public static java.lang.String getDirectory(java.lang.String urlString)
Get direcctory from URL.

Parameters:
urlString - URL string.
Returns:
Directory for this URL.

getFile

public static java.lang.String getFile(java.lang.String urlString)
Get file from URL.

Parameters:
urlString - URL string.
Returns:
File name for this URL.