|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnet.spy.net.HTTPFetch
public class HTTPFetch
Oversimplified HTTP document fetcher.
| Constructor Summary | |
|---|---|
HTTPFetch(URL u)
Get an HTTPFetch instance for the given URL. |
|
HTTPFetch(URL u,
Map<String,List<String>> 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. |
long |
getLastModified()
Get the last modified date of this response. |
List<String> |
getLines()
Get a vector containing the individual lines of the document returned from the URL. |
Map<String,List<String>> |
getResponseHeaders()
Get the response headers from the request (will force a content fetch). |
int |
getStatus()
Get the HTTP status from this request. |
String |
getStrippedData()
Return the contents of the URL with the HTML tags stripped out. |
static void |
main(String[] args)
|
void |
setIfModifiedSince(long to)
Set the ifModifiedSince value for the request. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public HTTPFetch(URL u)
u - the URL to fetch
public HTTPFetch(URL u,
Map<String,List<String>> head)
u - URL to fetchhead - Map containing the headers to fetch| Method Detail |
|---|
public Map<String,List<String>> getResponseHeaders()
throws IOException
IOExceptionpublic void setIfModifiedSince(long to)
public int getStatus()
throws IOException
IOException
public long getLastModified()
throws IOException
IOException
public List<String> getLines()
throws IOException
IOException - 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 | |||||||||