anon.pay
Class HttpClient

java.lang.Object
  extended by anon.pay.HttpClient

public final class HttpClient
extends java.lang.Object


Field Summary
private  java.io.BufferedOutputStream m_OS
           
private  java.io.BufferedReader m_reader
           
private  java.net.Socket m_socket
           
 
Constructor Summary
HttpClient(java.net.Socket socket)
          Klasse zum Senden von Http-Request und empfangen der Antwort.
 
Method Summary
 void close()
          Schlie?t die Http-Verbindung.
 org.w3c.dom.Document readAnswer()
          Einlesen der Http-Antwort.
 void writeRequest(java.lang.String method, java.lang.String url, java.lang.String data)
          Sendet Http-Request.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

m_reader

private java.io.BufferedReader m_reader

m_OS

private java.io.BufferedOutputStream m_OS

m_socket

private java.net.Socket m_socket
Constructor Detail

HttpClient

public HttpClient(java.net.Socket socket)
           throws java.io.IOException
Klasse zum Senden von Http-Request und empfangen der Antwort.

Parameters:
socket - Socket, ?ber dem die Http-Verbindung l?uft.
Throws:
java.io.IOException
Method Detail

close

public void close()
           throws java.io.IOException,
                  XMLParseException
Schlie?t die Http-Verbindung.

Throws:
java.io.IOException
XMLParseException

writeRequest

public void writeRequest(java.lang.String method,
                         java.lang.String url,
                         java.lang.String data)
                  throws java.io.IOException
Sendet Http-Request.

Parameters:
method - Http-Methode (GET / POST)
url - URL
data - Im Body zu ?bermittelnde Daten
Throws:
java.io.IOException

readAnswer

public org.w3c.dom.Document readAnswer()
                                throws java.io.IOException,
                                       XMLParseException
Einlesen der Http-Antwort.

Returns:
Die im Body der Antwort enthaltenen Daten als XMLDocument
Throws:
java.io.IOException
XMLParseException