|
HTML Parser Home Page | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectorg.htmlparser.util.LinkProcessor
Processor class for links, is present basically as a utility class.
| Constructor Summary | |
LinkProcessor()
Create an HTMLLinkProcessor. |
|
| Method Summary | |
URL |
constructUrl(String link,
String base)
|
String |
extract(String link,
String base)
Create an absolute URL from a possibly relative link and a base URL. |
static String |
fixSpaces(String url)
Turn spaces into %20. |
String |
getBaseUrl()
Returns the baseUrl. |
static boolean |
isURL(String resourceLocn)
Check if a resource is a valid URL. |
static String |
removeLastSlash(String baseUrl)
|
void |
setBaseUrl(String baseUrl)
Sets the baseUrl. |
String |
stripQuotes(String string)
Remove double or single quotes from the string. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public LinkProcessor()
| Method Detail |
public String extract(String link,
String base)
link - The reslative portion of a URL.base - The base URL unless overridden by the current baseURL property.
public String stripQuotes(String string)
public URL constructUrl(String link,
String base)
throws MalformedURLException
MalformedURLExceptionpublic static String fixSpaces(String url)
url - The url containing spaces.
public static boolean isURL(String resourceLocn)
resourceLocn - The resource to test.
true if the resource is a valid URL.public String getBaseUrl()
public void setBaseUrl(String baseUrl)
baseUrl - The baseUrl to setpublic static String removeLastSlash(String baseUrl)
|
© 2004 Somik Raha Mar 14, 2004
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||