|
Kafenio.editor 0.8.5 | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectde.xeinfach.kafenio.urlfetch.URLFetch
Description: Fetches content from URLs
| Constructor Summary | |
URLFetch()
|
|
| Method Summary | |
void |
addHeader(HTTPHeader header)
Adds a request header to be sent to the server. |
void |
fetch()
Issues the request to the server. |
void |
flushHeaders()
Flushes any existing headers out, excluding cookies. |
int |
getHTTPStatusCode()
Gets the code portion of the HTTP status. |
java.lang.String |
getPOSTData()
Gets the POST data. |
java.net.URL |
getRedirectURL()
In the case of a redirect, gets the URL to go to. |
HTTPHeader |
getRequestHeader(java.lang.String name)
Gets a request header by name. |
java.util.HashSet |
getRequestHeaders()
Returns the HTTP request headers. |
java.lang.String |
getRequestLine()
Returns the first line of the request. |
java.lang.String |
getRequestMethod()
Returns the request method used. |
byte[] |
getResponseBody()
If a binary file was fetched, this function will return it as a byte array. |
HTTPHeader |
getResponseHeader(java.lang.String name)
Gets a response header by name. |
java.util.HashSet |
getResponseHeaders()
Returns the HTTP headers received from the server. |
java.lang.String |
getResponseStatus()
Returns the HTTP status of a response. |
java.net.URL |
getURL()
Gets the URL to be fetched. |
void |
setAuthorization(java.lang.String newAuthorizationUsername,
java.lang.String newAuthorizationPassword)
Sets authorization tokens in the case of BASIC authentication |
void |
setPOSTData(java.lang.String newPostData)
Sets the POST data. |
void |
setProxyHost(java.lang.String newProxyHost)
Sets the host of the proxy, if one is needed. |
void |
setProxyPassword(java.lang.String newProxyPassword)
Sets the password of the proxy, if one is needed. |
void |
setProxyPort(int newProxyPort)
Sets the port of the proxy, if one is needed. |
void |
setResponseStatus(java.lang.String newResponseStatus)
Sets the HTTP status of a response. |
void |
setURL(java.net.URL newUrl)
Sets the URL to be fetched. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public URLFetch()
| Method Detail |
public void fetch()
throws java.io.IOException
java.io.IOException - an IOExceptionpublic void flushHeaders()
public java.net.URL getURL()
public void setURL(java.net.URL newUrl)
newUrl - The URL.public void setPOSTData(java.lang.String newPostData)
newPostData - The POST data.public java.lang.String getPOSTData()
public HTTPHeader getResponseHeader(java.lang.String name)
name - The name of the desired header.
public java.net.URL getRedirectURL()
URL to redirect to.public java.util.HashSet getRequestHeaders()
public HTTPHeader getRequestHeader(java.lang.String name)
name - The name of the desired header.
public java.lang.String getRequestMethod()
public java.lang.String getRequestLine()
public java.util.HashSet getResponseHeaders()
public void setAuthorization(java.lang.String newAuthorizationUsername,
java.lang.String newAuthorizationPassword)
newAuthorizationUsername - The username.newAuthorizationPassword - The password.public void addHeader(HTTPHeader header)
header - The header to be sent in the request.public byte[] getResponseBody()
public java.lang.String getResponseStatus()
public void setResponseStatus(java.lang.String newResponseStatus)
newResponseStatus - The status.public int getHTTPStatusCode()
public void setProxyHost(java.lang.String newProxyHost)
newProxyHost - The host.public void setProxyPort(int newProxyPort)
newProxyPort - The port.public void setProxyPassword(java.lang.String newProxyPassword)
newProxyPassword - The password.
|
Kafenio.editor 0.8.5 | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||