|
Enterprise Information Portal APIs |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.ibm.gcs.netutil.URLProcessor
URLProcessor is a helper class for parsing a URL String. It has static methods for determining whether a URL is relative, normalizing and making a URL absolute, getting URL segments, etc.
Constructor Summary | |
URLProcessor()
|
Method Summary | |
static java.lang.String |
changePathIntoWindowsFile(java.lang.String path)
makes the path into a filename (escapes '\' and '/') and replaces illegal Windows filesystem characters with escape sequences; this makes the path a valid filename in Windows, and the URL should still be resolved correctly on the web. |
static java.lang.String |
cleanPathForWindows(java.lang.String path)
replaces illegal Windows filesystem characters with escape sequences; this makes the path a valid path in Windows, and the URL should still be resolved correctly on the web. |
static java.lang.String |
getDir(java.net.URL url)
(static) gets the dir from a URL (basically everything up to and ending with the last "/"). |
static java.lang.String |
getFileExtension(java.lang.String urlString)
(static) gets the file extension from a URL String |
static java.lang.String |
getFileExtension(java.net.URL url)
(static) gets the file extension from a URL |
static java.lang.String |
getFilename(java.net.URL url)
(static) gets the filename from a URL (not including the dir). |
static boolean |
isRelative(java.lang.String url)
(static) checks whether a URL is relative. |
static void |
main(java.lang.String[] args)
|
static java.util.Collection |
makeAbsolute(java.net.URL baseURL,
java.util.Collection relURLStrings)
(static) makes a Collection of URLs absolute according to some base URL, with redundant URLs removed. |
static java.net.URL |
makeAbsolute(java.net.URL baseURL,
java.lang.String relURLString)
(static) makes a URL absolute according to some base URL |
static java.lang.String |
removeSingleDots(java.lang.String path)
replaces "/./" in a path String with "/" |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public URLProcessor()
Method Detail |
public static boolean isRelative(java.lang.String url)
url
- the URL String to checkpublic static java.net.URL makeAbsolute(java.net.URL baseURL, java.lang.String relURLString)
baseURL
- the URL baserelURLString
- a relative (or absolute) URL stringpublic static java.util.Collection makeAbsolute(java.net.URL baseURL, java.util.Collection relURLStrings)
baseURL
- the URL baserelURLStrings
- a Collection of relative (or absolute) URL Stringspublic static java.lang.String getFileExtension(java.lang.String urlString)
public static java.lang.String getDir(java.net.URL url)
public static java.lang.String getFilename(java.net.URL url)
public static java.lang.String getFileExtension(java.net.URL url)
public static java.lang.String removeSingleDots(java.lang.String path)
public static java.lang.String cleanPathForWindows(java.lang.String path)
public static java.lang.String changePathIntoWindowsFile(java.lang.String path)
cleanPathForWindows(java.lang.String)
public static void main(java.lang.String[] args)
|
EIP Web Crawler APIs | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |