fi.hut.tml.xsmiles.util
Class HTTPJavaImpl

java.lang.Object
  extended byfi.hut.tml.xsmiles.util.HTTPJavaImpl
All Implemented Interfaces:
HTTPInterface

public class HTTPJavaImpl
extends java.lang.Object
implements HTTPInterface

Author:
honkkis

Constructor Summary
HTTPJavaImpl()
           
 
Method Summary
 java.lang.String base64Encode(byte[] bytes)
          encodes an string for jdk 1.1 authentication support
 void enableDebug(boolean debug)
           
 XSmilesConnection get(java.net.URL dest, BrowserWindow b)
          Post data to an URL and return the InputStream to the reply
 java.lang.String getAcceptHeader()
           
protected  java.lang.String getRealm(java.lang.String property)
          parses the WWW-Authenticate property and returns the realm for jdk1.1 support
protected  java.net.URLConnection openConnection(java.net.URL dest)
           
 XSmilesConnection post(java.net.URL dest, byte[] data, java.util.Hashtable properties, java.lang.String content_type)
          Post data to an URL and return the InputStream to the reply TODO: support for authentication!
 XSmilesConnection post(java.net.URL dest, java.lang.String data, java.util.Hashtable properties, java.lang.String content_type)
          Post data to an URL and return the InputStream to the reply TODO: support for authentication!
 XSmilesConnection put(java.net.URL dest, byte[] data, java.util.Hashtable properties, java.lang.String content_type)
          Post data to an URL and return the InputStream to the reply TODO: support for authentication!
 XSmilesConnection put(java.net.URL dest, java.lang.String data, java.util.Hashtable properties, java.lang.String content_type)
          Post data to an URL and return the InputStream to the reply TODO: support for authentication!
 void setBrowser(BrowserWindow b)
           
 void setRequestProperties(java.net.URLConnection connection)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HTTPJavaImpl

public HTTPJavaImpl()
Method Detail

get

public XSmilesConnection get(java.net.URL dest,
                             BrowserWindow b)
                      throws java.lang.Exception
Post data to an URL and return the InputStream to the reply

Specified by:
get in interface HTTPInterface
Throws:
java.lang.Exception

base64Encode

public java.lang.String base64Encode(byte[] bytes)
encodes an string for jdk 1.1 authentication support


openConnection

protected java.net.URLConnection openConnection(java.net.URL dest)
                                         throws java.io.IOException
Throws:
java.io.IOException

getRealm

protected java.lang.String getRealm(java.lang.String property)
parses the WWW-Authenticate property and returns the realm for jdk1.1 support


setRequestProperties

public void setRequestProperties(java.net.URLConnection connection)

getAcceptHeader

public java.lang.String getAcceptHeader()

post

public XSmilesConnection post(java.net.URL dest,
                              java.lang.String data,
                              java.util.Hashtable properties,
                              java.lang.String content_type)
                       throws java.lang.Exception
Post data to an URL and return the InputStream to the reply TODO: support for authentication!

Throws:
java.lang.Exception

post

public XSmilesConnection post(java.net.URL dest,
                              byte[] data,
                              java.util.Hashtable properties,
                              java.lang.String content_type)
                       throws java.lang.Exception
Post data to an URL and return the InputStream to the reply TODO: support for authentication!

Specified by:
post in interface HTTPInterface
Throws:
java.lang.Exception

put

public XSmilesConnection put(java.net.URL dest,
                             java.lang.String data,
                             java.util.Hashtable properties,
                             java.lang.String content_type)
                      throws java.lang.Exception
Post data to an URL and return the InputStream to the reply TODO: support for authentication!

Throws:
java.lang.Exception

put

public XSmilesConnection put(java.net.URL dest,
                             byte[] data,
                             java.util.Hashtable properties,
                             java.lang.String content_type)
                      throws java.lang.Exception
Post data to an URL and return the InputStream to the reply TODO: support for authentication!

Specified by:
put in interface HTTPInterface
Throws:
java.lang.Exception

setBrowser

public void setBrowser(BrowserWindow b)
Specified by:
setBrowser in interface HTTPInterface

enableDebug

public void enableDebug(boolean debug)
Specified by:
enableDebug in interface HTTPInterface


X-Smiles 1.2