rjw.dc.http
Class HttpConnection

java.lang.Object
  |
  +--rjw.dc.http.HttpConnection

public class HttpConnection
extends java.lang.Object

Creates a connection to a webserver using http

Since:
1.2
Version:
3.03
Author:
Robert-Jan van der Waals

Constructor Summary
HttpConnection(java.lang.String sHost)
          Creates a connection to a webserver
 
Method Summary
 void addQuery(java.lang.String sName, java.lang.String sValue)
           
 void clearQueryBuffer()
           
 void close()
          Closes the internet connection
 void createConnection(java.lang.String sHost)
          Create a http connection.
 java.lang.String get(java.lang.String sFile)
           
 java.lang.String post(java.lang.String sFile)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HttpConnection

public HttpConnection(java.lang.String sHost)
               throws java.lang.Exception
Creates a connection to a webserver

Parameters:
sHost - the URL of the webserver
Method Detail

close

public void close()
Closes the internet connection


createConnection

public void createConnection(java.lang.String sHost)
                      throws java.lang.Exception
Create a http connection. If a proxy has been specified in the settings it will be used to create the connection

Parameters:
sHost - the url
java.lang.Exception

addQuery

public void addQuery(java.lang.String sName,
                     java.lang.String sValue)

clearQueryBuffer

public void clearQueryBuffer()

post

public java.lang.String post(java.lang.String sFile)
                      throws java.lang.Exception
java.lang.Exception

get

public java.lang.String get(java.lang.String sFile)
                     throws java.lang.Exception
java.lang.Exception