fi.hut.tml.xsmiles.protocol.http
Class XHttpURLConnection

java.lang.Object
  extended byjava.net.URLConnection
      extended byjava.net.HttpURLConnection
          extended byfi.hut.tml.xsmiles.protocol.http.XHttpURLConnection

public class XHttpURLConnection
extends java.net.HttpURLConnection

This is a wrapper for HttpURLConnection We want to send CC/PP with the header


Field Summary
 
Fields inherited from class java.net.HttpURLConnection
HTTP_ACCEPTED, HTTP_BAD_GATEWAY, HTTP_BAD_METHOD, HTTP_BAD_REQUEST, HTTP_CLIENT_TIMEOUT, HTTP_CONFLICT, HTTP_CREATED, HTTP_ENTITY_TOO_LARGE, HTTP_FORBIDDEN, HTTP_GATEWAY_TIMEOUT, HTTP_GONE, HTTP_INTERNAL_ERROR, HTTP_LENGTH_REQUIRED, HTTP_MOVED_PERM, HTTP_MOVED_TEMP, HTTP_MULT_CHOICE, HTTP_NO_CONTENT, HTTP_NOT_ACCEPTABLE, HTTP_NOT_AUTHORITATIVE, HTTP_NOT_FOUND, HTTP_NOT_IMPLEMENTED, HTTP_NOT_MODIFIED, HTTP_OK, HTTP_PARTIAL, HTTP_PAYMENT_REQUIRED, HTTP_PRECON_FAILED, HTTP_PROXY_AUTH, HTTP_REQ_TOO_LONG, HTTP_RESET, HTTP_SEE_OTHER, HTTP_SERVER_ERROR, HTTP_UNAUTHORIZED, HTTP_UNAVAILABLE, HTTP_UNSUPPORTED_TYPE, HTTP_USE_PROXY, HTTP_VERSION, instanceFollowRedirects, method, responseCode, responseMessage
 
Fields inherited from class java.net.URLConnection
allowUserInteraction, connected, doInput, doOutput, ifModifiedSince, url, useCaches
 
Constructor Summary
XHttpURLConnection(java.net.URL u)
           
 
Method Summary
 void connect()
           
 void disconnect()
           
 boolean getAllowUserInteraction()
           
 java.lang.Object getContent()
           
 java.lang.String getContentEncoding()
           
 int getContentLength()
           
 java.lang.String getContentType()
           
 long getDate()
           
static boolean getDefaultAllowUserInteraction()
           
static java.lang.String getDefaultRequestProperty(java.lang.String key)
           
 boolean getDefaultUseCaches()
           
 boolean getDoInput()
           
 boolean getDoOutput()
           
 long getExpiration()
           
static java.net.FileNameMap getFileNameMap()
           
static boolean getFollowRedirects()
           
 java.lang.String getHeaderField(int n)
           
 java.lang.String getHeaderField(java.lang.String name)
           
 long getHeaderFieldDate(java.lang.String name, long Default)
           
 int getHeaderFieldInt(java.lang.String name, int Default)
           
 java.lang.String getHeaderFieldKey(int n)
           
 long getIfModifiedSince()
           
 java.io.InputStream getInputStream()
           
 long getLastModified()
           
 java.io.OutputStream getOutputStream()
           
 java.lang.String getRequestMethod()
           
 java.lang.String getRequestProperty(java.lang.String key)
           
 int getResponseCode()
           
 java.lang.String getResponseMessage()
           
 java.net.URL getURL()
           
 boolean getUseCaches()
           
static void rereadDeviceURI(java.lang.String guiName)
          Kludge to enable different CCPP URI in different BrowserWindows.
 void setAllowUserInteraction(boolean allowuserinteraction)
           
static void setConfigurer(XMLConfigurer conf)
           
 void setDefaultUseCaches(boolean defaultusecaches)
           
 void setDoInput(boolean doinput)
           
 void setDoOutput(boolean dooutput)
           
static void setFileNameMap(java.net.FileNameMap map)
           
 void setIfModifiedSince(long ifmodifiedsince)
           
 void setRequestMethod(java.lang.String method)
           
 void setRequestProperty(java.lang.String key, java.lang.String value)
           
 void setUseCaches(boolean usecaches)
           
 java.lang.String toString()
           
 boolean usingProxy()
           
 
Methods inherited from class java.net.HttpURLConnection
getErrorStream, getInstanceFollowRedirects, getPermission, setFollowRedirects, setInstanceFollowRedirects
 
Methods inherited from class java.net.URLConnection
addRequestProperty, getContent, getHeaderFields, getRequestProperties, guessContentTypeFromName, guessContentTypeFromStream, setContentHandlerFactory, setDefaultAllowUserInteraction, setDefaultRequestProperty
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

XHttpURLConnection

public XHttpURLConnection(java.net.URL u)
Method Detail

setConfigurer

public static void setConfigurer(XMLConfigurer conf)

rereadDeviceURI

public static void rereadDeviceURI(java.lang.String guiName)
Kludge to enable different CCPP URI in different BrowserWindows.


usingProxy

public boolean usingProxy()

disconnect

public void disconnect()

connect

public void connect()
             throws java.io.IOException
Throws:
java.io.IOException

getFollowRedirects

public static boolean getFollowRedirects()

getHeaderFieldDate

public long getHeaderFieldDate(java.lang.String name,
                               long Default)

getRequestMethod

public java.lang.String getRequestMethod()

getResponseCode

public int getResponseCode()
                    throws java.io.IOException
Throws:
java.io.IOException

getResponseMessage

public java.lang.String getResponseMessage()
                                    throws java.io.IOException
Throws:
java.io.IOException

setRequestMethod

public void setRequestMethod(java.lang.String method)
                      throws java.net.ProtocolException
Throws:
java.net.ProtocolException

getAllowUserInteraction

public boolean getAllowUserInteraction()

getContent

public java.lang.Object getContent()
                            throws java.io.IOException
Throws:
java.io.IOException

getContentEncoding

public java.lang.String getContentEncoding()

getContentLength

public int getContentLength()

getContentType

public java.lang.String getContentType()

getDate

public long getDate()

getDefaultAllowUserInteraction

public static boolean getDefaultAllowUserInteraction()

getDefaultRequestProperty

public static java.lang.String getDefaultRequestProperty(java.lang.String key)

getDefaultUseCaches

public boolean getDefaultUseCaches()

getDoInput

public boolean getDoInput()

getDoOutput

public boolean getDoOutput()

getExpiration

public long getExpiration()

getFileNameMap

public static java.net.FileNameMap getFileNameMap()

getHeaderField

public java.lang.String getHeaderField(int n)

getHeaderField

public java.lang.String getHeaderField(java.lang.String name)

getHeaderFieldInt

public int getHeaderFieldInt(java.lang.String name,
                             int Default)

getHeaderFieldKey

public java.lang.String getHeaderFieldKey(int n)

getIfModifiedSince

public long getIfModifiedSince()

getInputStream

public java.io.InputStream getInputStream()
                                   throws java.io.IOException
Throws:
java.io.IOException

getLastModified

public long getLastModified()

getOutputStream

public java.io.OutputStream getOutputStream()
                                     throws java.io.IOException
Throws:
java.io.IOException

getRequestProperty

public java.lang.String getRequestProperty(java.lang.String key)

getURL

public java.net.URL getURL()

getUseCaches

public boolean getUseCaches()

setAllowUserInteraction

public void setAllowUserInteraction(boolean allowuserinteraction)

setDefaultUseCaches

public void setDefaultUseCaches(boolean defaultusecaches)

setDoInput

public void setDoInput(boolean doinput)

setDoOutput

public void setDoOutput(boolean dooutput)

setFileNameMap

public static void setFileNameMap(java.net.FileNameMap map)

setIfModifiedSince

public void setIfModifiedSince(long ifmodifiedsince)

setRequestProperty

public void setRequestProperty(java.lang.String key,
                               java.lang.String value)

setUseCaches

public void setUseCaches(boolean usecaches)

toString

public java.lang.String toString()


X-Smiles 1.2