|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectnet.spy.net.HTTPFetch
Oversimplified HTTP document fetcher.
| Constructor Summary | |
HTTPFetch(String u)
Deprecated. don't pass Strings, pass URLs |
|
HTTPFetch(String u,
Map head)
Deprecated. don't pass Strings, pass URLs |
|
HTTPFetch(URL u)
Get an HTTPFetch instance for the given URL. |
|
HTTPFetch(URL u,
Map head)
Get an HTTPFetch instance for the given URL and headers. |
|
| Method Summary | |
String |
getData()
Return the contents of the URL as a whole string. |
List |
getLines()
Get a vector containing the individual lines of the document returned from the URL. |
String |
getStrippedData()
Return the contents of the URL with the HTML tags stripped out. |
static void |
main(String[] args)
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public HTTPFetch(String u)
throws MalformedURLException
u - String representation of the URL we'll be connecting to.
MalformedURLException - Thrown if the URL cannot be parsed.
public HTTPFetch(String u,
Map head)
throws MalformedURLException
u - String representation of the URL we'll be connecting to.head - Map containing headers to set.
MalformedURLException - Thrown if the URL cannot be parsed.public HTTPFetch(URL u)
u - the URL to fetch
public HTTPFetch(URL u,
Map head)
u - URL to fetchhead - Map containing the headers to fetch| Method Detail |
public List getLines()
throws Exception
Exception - thrown when something fails.
public String getData()
throws IOException
IOException - if there is a problem accessing the URL
public String getStrippedData()
throws Exception
Exception - thrown when something fails.
public static void main(String[] args)
throws Exception
Exception
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||