totalcross.xml.rpc
Class CompressedHttpClient

totalcross.lang.Object
  extended by totalcross.xml.rpc.StandardHttpClient
      extended by totalcross.xml.rpc.CompressedHttpClient

public class CompressedHttpClient
extends StandardHttpClient


Field Summary
 
Fields inherited from class totalcross.xml.rpc.StandardHttpClient
auth, host, hostname, htHeader, keepAlive, port, sb, socket, uri
 
Constructor Summary
CompressedHttpClient(String hostname, int port, String uri)
          See the constructor for the StandardHttpClient
 
Method Summary
 String execute(byte[] requestBody)
          Executes a HTTP request to the connected server
protected  StringBuffer writeRequestHeader(int requestLength)
          Writes the headers for a HTTP request, adding the deflate method as content-encoding.
 
Methods inherited from class totalcross.xml.rpc.StandardHttpClient
checkResponse, closeConnection, parseHeader, readLine, readResponse, setBasicAuthentication, writeRequest
 
Methods inherited from class totalcross.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CompressedHttpClient

public CompressedHttpClient(String hostname,
                            int port,
                            String uri)
                     throws XmlRpcException,
                            UnknownHostException
See the constructor for the StandardHttpClient

Throws:
XmlRpcException
UnknownHostException
Method Detail

execute

public String execute(byte[] requestBody)
               throws XmlRpcException
Executes a HTTP request to the connected server

Overrides:
execute in class StandardHttpClient
Parameters:
requestBody - The contents of the HTTP request. Headers are added appropriately by this method after the request is compressed
Throws:
XmlRpcException - If the server returns a status code other than 200 OK

writeRequestHeader

protected StringBuffer writeRequestHeader(int requestLength)
Writes the headers for a HTTP request, adding the deflate method as content-encoding.

Overrides:
writeRequestHeader in class StandardHttpClient