|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcs132.webPage.ExtractHRefs
public class ExtractHRefs
Class provides static methods for extracting URLs from a downloaded web page.
| Method Summary | |
|---|---|
static void |
extractHRefs(java.net.URL webPage,
Callback callback)
Connect to a URL, download the contents of the contents and look for embedded HRefs. |
static void |
main(java.lang.String[] args)
|
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public static void extractHRefs(java.net.URL webPage,
Callback callback)
URL.URL(java.net.URL, java.lang.String) constructor for
URLs. The first parameter should be the result of calling
URLConnection.getURL() on the URLConnection being used to
download the contents of the web page
We only look for (and want to find) an HRef contained on a single line of
text, and should ignore HRefs that span more than one line of text.
webPage - -
URL of web page to download and extract URLs fromcallback - -
callback to invoke for each HRef found.URL.URL(java.net.URL, java.lang.String)
public static void main(java.lang.String[] args)
throws java.lang.Exception
java.lang.Exception
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||