public class CompressedHttpClient extends StandardHttpClient
Constructor and Description |
---|
CompressedHttpClient(java.lang.String hostname,
int port,
java.lang.String uri) |
CompressedHttpClient(java.lang.String hostname,
int port,
java.lang.String uri,
int openTimeout,
int readTimeout,
int writeTimeout)
See the constructor for the StandardHttpClient
|
Modifier and Type | Method and Description |
---|---|
java.lang.String |
execute(byte[] requestBody)
Executes a HTTP request to the connected server
|
byte[] |
executeReturnBytes(byte[] requestBody)
Executes a HTTP request to the connected server
|
protected java.lang.StringBuffer |
writeRequestHeader(int requestLength)
Writes the headers for a HTTP request, adding the deflate method as content-encoding.
|
checkResponse, closeConnection, parseHeader, privateReadResponse, readLine, readResponse, readResponseBytes, setBasicAuthentication, writeRequest
public CompressedHttpClient(java.lang.String hostname, int port, java.lang.String uri, int openTimeout, int readTimeout, int writeTimeout) throws XmlRpcException, UnknownHostException
XmlRpcException
UnknownHostException
public CompressedHttpClient(java.lang.String hostname, int port, java.lang.String uri) throws XmlRpcException, UnknownHostException
XmlRpcException
UnknownHostException
public java.lang.String execute(byte[] requestBody) throws XmlRpcException
execute
in class StandardHttpClient
requestBody
- The contents of the HTTP request. Headers are added
appropriately by this method after the request is compressedXmlRpcException
- If the server returns a status code other than 200 OKpublic byte[] executeReturnBytes(byte[] requestBody) throws XmlRpcException
executeReturnBytes
in class StandardHttpClient
requestBody
- The contents of the HTTP request. Headers are added
appropriately by this method after the request is compressedXmlRpcException
- If the server returns a status code other than 200 OKprotected java.lang.StringBuffer writeRequestHeader(int requestLength)
writeRequestHeader
in class StandardHttpClient