|
ElegantJ Data Tables Java API Specification v1.1 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.elegantj.net.http.HTTPClient
This class encapsulates HTTPClient functionality. It supports HTTP version 1.0.
| Field Summary | |
static java.lang.String |
HTTP_GET_METHOD
The HTTP GET method |
static java.lang.String |
HTTP_HEAD_METHOD
The HTTP HEAD method |
static java.lang.String |
HTTP_POST_METHOD
The HTTP POST method |
| Constructor Summary | |
HTTPClient()
Constructs HTTPClient with empty request and response headers. |
|
| Method Summary | |
void |
addPropertyChangeListener(java.beans.PropertyChangeListener pcl)
|
void |
clearHTTPRequestHeaders()
Method which clears the HTTP request headers. |
void |
clearHTTPResponseHeaders()
Method which clears the HTTP response headers. |
void |
closeConnection()
Close the connection. |
java.lang.String |
getHTTPRequest()
Method which returns the HTTP request. |
java.lang.String |
getHTTPRequestEntityBody()
Method which returns the entity body of the HTTP request. |
java.lang.String |
getHTTPRequestEntityHeader()
Method which returns the entity header of the HTTP request. |
java.lang.String |
getHTTPRequestEntityHeaderProperty(java.lang.String field)
Method which returns the value for specified entity header field of HTTP entity header. |
java.lang.String |
getHTTPRequestGeneralHeader()
Method which returns the general header of the HTTP request. |
java.lang.String |
getHTTPRequestGeneralHeaderProperty(java.lang.String field)
Method which returns the value for specified general header field of HTTP request header. |
java.lang.String |
getHTTPRequestHeader()
Method which returns the request header of the HTTP request. |
java.lang.String |
getHTTPRequestHeaderProperty(java.lang.String field)
Method which returns the value for specified request header field of HTTP request header. |
java.lang.String |
getHTTPResponse()
Method which returns the HTTP response. |
byte[] |
getHTTPResponseEntityBody()
Method which returns the entity body of the HTTP response. |
java.lang.String |
getHTTPResponseHeader()
Method which returns the response header of the HTTP response. |
java.lang.String |
getHTTPResponseHeaderProperty(java.lang.String field)
Method which returns the value for specified response header field of HTTP response header. |
java.io.DataInputStream |
getInputStream()
Returns the input stream to read the response. |
java.lang.String |
getMethod()
Returns the name of the HTTP method. |
java.io.OutputStream |
getOutputStream()
Returns the output stream to write the request. |
void |
getResponseFromServer()
Method which reads HTTP response from the web server. |
void |
getResponseHeaderFromServer()
Method which reads HTTP response header from the web server. |
java.lang.String |
getURL()
Method which returns the url for this HTTPClient. |
boolean |
openConnection()
Opens a connection with the host and port specified in the URL. |
void |
removePropertyChangeListener(java.beans.PropertyChangeListener pcl)
|
void |
sendRequestToServer()
Method which sends the HTTP request to the web server. |
void |
setFileAsEntityBody(java.io.File file)
Method which set the content of the specified file as the entity body for the HTTP POST request. |
void |
setHTTPRequestEntityHeaderProperty(java.lang.String field,
java.lang.String value)
Method which sets the entity header property for the HTTP entity header. |
void |
setHTTPRequestGeneralHeaderProperty(java.lang.String field,
java.lang.String value)
Method which sets the general header property for the HTTP request header. |
void |
setHTTPRequestHeaderProperty(java.lang.String field,
java.lang.String value)
Method which sets the request header property for the HTTP request header. |
void |
setMethod(java.lang.String method)
Method which sets the name of the HTTP method. |
void |
setStringBufferAsEntityBody(java.lang.String buffer)
Method which set the specified string buffer as the entity body for the HTTP POST request. |
void |
setURL(java.lang.String urlStr)
Method which set the url for this HTTPClient. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
public static final java.lang.String HTTP_GET_METHOD
public static final java.lang.String HTTP_HEAD_METHOD
public static final java.lang.String HTTP_POST_METHOD
| Constructor Detail |
public HTTPClient()
| Method Detail |
public boolean openConnection()
public void closeConnection()
public java.io.DataInputStream getInputStream()
public java.io.OutputStream getOutputStream()
public void clearHTTPRequestHeaders()
public void clearHTTPResponseHeaders()
public void setMethod(java.lang.String method)
public java.lang.String getMethod()
public void setURL(java.lang.String urlStr)
urlStr - The url string for this HTTPClient.public java.lang.String getURL()
public void setHTTPRequestGeneralHeaderProperty(java.lang.String field,
java.lang.String value)
field - The name of general header field.value - The value for that field.public java.lang.String getHTTPRequestGeneralHeaderProperty(java.lang.String field)
field - The name of general header field.
public java.lang.String getHTTPRequestGeneralHeader()
public void setHTTPRequestHeaderProperty(java.lang.String field,
java.lang.String value)
field - The name of request header field.value - The value for that field.public java.lang.String getHTTPRequestHeaderProperty(java.lang.String field)
field - The name of request header field.
public java.lang.String getHTTPRequestHeader()
public void setHTTPRequestEntityHeaderProperty(java.lang.String field,
java.lang.String value)
field - The name of entity header field.value - The value for that field.public java.lang.String getHTTPRequestEntityHeaderProperty(java.lang.String field)
field - The name of entity header field.
public java.lang.String getHTTPRequestEntityHeader()
public java.lang.String getHTTPRequestEntityBody()
public java.lang.String getHTTPRequest()
public java.lang.String getHTTPResponseHeaderProperty(java.lang.String field)
field - The name of response header field.
public java.lang.String getHTTPResponseHeader()
public byte[] getHTTPResponseEntityBody()
public java.lang.String getHTTPResponse()
public void sendRequestToServer()
public void getResponseHeaderFromServer()
public void getResponseFromServer()
public void setStringBufferAsEntityBody(java.lang.String buffer)
buffer - The string buffer which holds the data to post.public void setFileAsEntityBody(java.io.File file)
file - The file which contains the data to post.public void addPropertyChangeListener(java.beans.PropertyChangeListener pcl)
public void removePropertyChangeListener(java.beans.PropertyChangeListener pcl)
|
ElegantJ Data Tables Java API Specification v1.1 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||