org.af.commons.errorhandling
Class HTTPPoster

java.lang.Object
  extended by org.af.commons.errorhandling.HTTPPoster

public class HTTPPoster
extends Object

Uploads String values and files via HTTP.


Field Summary
static int maxBufferSize
           
 
Constructor Summary
HTTPPoster()
           
 
Method Summary
static void main(String[] args)
           
 String post(String urlString, Hashtable<String,String> table, Hashtable<String,File> files)
          Uploads String values and files via HTTP.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

maxBufferSize

public static final int maxBufferSize
See Also:
Constant Field Values
Constructor Detail

HTTPPoster

public HTTPPoster()
Method Detail

post

public String post(String urlString,
                   Hashtable<String,String> table,
                   Hashtable<String,File> files)
            throws IOException
Uploads String values and files via HTTP.

Parameters:
urlString - the URL to that we want to send a POST
table - will be send as form-data
files - will be attached
Returns:
the response of the server
Throws:
IOException

main

public static void main(String[] args)
                 throws Exception
Throws:
Exception