|
||||||||||
| 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(java.net.URL u)
Get an HTTPFetch instance for the given URL. |
|
HTTPFetch(java.net.URL u,
java.util.Map head)
Get an HTTPFetch instance for the given URL and headers. |
|
| Method Summary | |
|---|---|
java.lang.String |
getData()
Return the contents of the URL as a whole string. |
long |
getLastModified()
Get the last modified date of this response. |
java.util.List |
getLines()
Get a vector containing the individual lines of the document returned from the URL. |
java.util.Map |
getResponseHeaders()
Get the response headers from the request (will force a content fetch). |
int |
getStatus()
Get the HTTP status from this request. |
java.lang.String |
getStrippedData()
Return the contents of the URL with the HTML tags stripped out. |
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(java.net.URL u)
u - the URL to fetch
public HTTPFetch(java.net.URL u,
java.util.Map head)
u - URL to fetchhead - Map containing the headers to fetch| Method Detail |
|---|
public java.util.Map getResponseHeaders()
throws java.io.IOException
java.io.IOExceptionpublic void setIfModifiedSince(long to)
public int getStatus()
throws java.io.IOException
java.io.IOException
public long getLastModified()
throws java.io.IOException
java.io.IOException
public java.util.List getLines()
throws java.io.IOException
java.lang.Exception - thrown when something fails.
java.io.IOException
public java.lang.String getData()
throws java.io.IOException
java.io.IOException - if there is a problem accessing the URL
public java.lang.String getStrippedData()
throws java.lang.Exception
java.lang.Exception - thrown when something fails.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||