Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

com.barteo.cldc.http
Class Connection  view Connection download Connection.java

java.lang.Object
  extended bycom.barteo.cldc.http.Connection
All Implemented Interfaces:
com.barteo.cldc.ClosedConnection, javax.microedition.io.Connection, javax.microedition.io.ContentConnection, javax.microedition.io.HttpConnection, javax.microedition.io.InputConnection, javax.microedition.io.OutputConnection, javax.microedition.io.StreamConnection

public class Connection
extends java.lang.Object
implements javax.microedition.io.HttpConnection, com.barteo.cldc.ClosedConnection


Field Summary
(package private)  java.net.URLConnection cn
           
(package private)  boolean connected
           
 
Fields inherited from interface javax.microedition.io.HttpConnection
GET, HEAD, HTTP_ACCEPTED, HTTP_BAD_GATEWAY, HTTP_BAD_METHOD, HTTP_BAD_REQUEST, HTTP_CLIENT_TIMEOUT, HTTP_CONFLICT, HTTP_CREATED, HTTP_ENTITY_TOO_LARGE, HTTP_EXPECT_FAILED, 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_TEMP_REDIRECT, HTTP_UNAUTHORIZED, HTTP_UNAVAILABLE, HTTP_UNSUPPORTED_RANGE, HTTP_UNSUPPORTED_TYPE, HTTP_USE_PROXY, HTTP_VERSION, POST
 
Constructor Summary
Connection()
           
 
Method Summary
 void close()
           
 long getDate()
           
 java.lang.String getEncoding()
           
 long getExpiration()
           
 java.lang.String getFile()
           
 java.lang.String getHeaderField(int n)
           
 java.lang.String getHeaderField(java.lang.String name)
           
 long getHeaderFieldDate(java.lang.String name, long def)
           
 int getHeaderFieldInt(java.lang.String name, int def)
           
 java.lang.String getHeaderFieldKey(int n)
           
 java.lang.String getHost()
           
 long getLastModified()
           
 long getLength()
           
 int getPort()
           
 java.lang.String getProtocol()
           
 java.lang.String getQuery()
           
 java.lang.String getRef()
           
 java.lang.String getRequestMethod()
           
 java.lang.String getRequestProperty(java.lang.String key)
           
 int getResponseCode()
           
 java.lang.String getResponseMessage()
           
 java.lang.String getType()
           
 java.lang.String getURL()
           
 javax.microedition.io.Connection open(java.lang.String name)
           
 java.io.DataInputStream openDataInputStream()
           
 java.io.DataOutputStream openDataOutputStream()
           
 java.io.InputStream openInputStream()
           
 java.io.OutputStream openOutputStream()
           
 void setRequestMethod(java.lang.String method)
           
 void setRequestProperty(java.lang.String key, java.lang.String value)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

cn

java.net.URLConnection cn

connected

boolean connected
Constructor Detail

Connection

public Connection()
Method Detail

open

public javax.microedition.io.Connection open(java.lang.String name)
                                      throws java.io.IOException
Specified by:
open in interface com.barteo.cldc.ClosedConnection

close

public void close()
           throws java.io.IOException
Specified by:
close in interface javax.microedition.io.Connection

getURL

public java.lang.String getURL()
Specified by:
getURL in interface javax.microedition.io.HttpConnection

getProtocol

public java.lang.String getProtocol()
Specified by:
getProtocol in interface javax.microedition.io.HttpConnection

getHost

public java.lang.String getHost()
Specified by:
getHost in interface javax.microedition.io.HttpConnection

getFile

public java.lang.String getFile()
Specified by:
getFile in interface javax.microedition.io.HttpConnection

getRef

public java.lang.String getRef()
Specified by:
getRef in interface javax.microedition.io.HttpConnection

getQuery

public java.lang.String getQuery()
Specified by:
getQuery in interface javax.microedition.io.HttpConnection

getPort

public int getPort()
Specified by:
getPort in interface javax.microedition.io.HttpConnection

getRequestMethod

public java.lang.String getRequestMethod()
Specified by:
getRequestMethod in interface javax.microedition.io.HttpConnection

setRequestMethod

public void setRequestMethod(java.lang.String method)
                      throws java.io.IOException
Specified by:
setRequestMethod in interface javax.microedition.io.HttpConnection

getRequestProperty

public java.lang.String getRequestProperty(java.lang.String key)
Specified by:
getRequestProperty in interface javax.microedition.io.HttpConnection

setRequestProperty

public void setRequestProperty(java.lang.String key,
                               java.lang.String value)
                        throws java.io.IOException
Specified by:
setRequestProperty in interface javax.microedition.io.HttpConnection

getResponseCode

public int getResponseCode()
                    throws java.io.IOException
Specified by:
getResponseCode in interface javax.microedition.io.HttpConnection

getResponseMessage

public java.lang.String getResponseMessage()
                                    throws java.io.IOException
Specified by:
getResponseMessage in interface javax.microedition.io.HttpConnection

getExpiration

public long getExpiration()
                   throws java.io.IOException
Specified by:
getExpiration in interface javax.microedition.io.HttpConnection

getDate

public long getDate()
             throws java.io.IOException
Specified by:
getDate in interface javax.microedition.io.HttpConnection

getLastModified

public long getLastModified()
                     throws java.io.IOException
Specified by:
getLastModified in interface javax.microedition.io.HttpConnection

getHeaderField

public java.lang.String getHeaderField(java.lang.String name)
                                throws java.io.IOException
Specified by:
getHeaderField in interface javax.microedition.io.HttpConnection

getHeaderFieldInt

public int getHeaderFieldInt(java.lang.String name,
                             int def)
                      throws java.io.IOException
Specified by:
getHeaderFieldInt in interface javax.microedition.io.HttpConnection

getHeaderFieldDate

public long getHeaderFieldDate(java.lang.String name,
                               long def)
                        throws java.io.IOException
Specified by:
getHeaderFieldDate in interface javax.microedition.io.HttpConnection

getHeaderField

public java.lang.String getHeaderField(int n)
                                throws java.io.IOException
Specified by:
getHeaderField in interface javax.microedition.io.HttpConnection

getHeaderFieldKey

public java.lang.String getHeaderFieldKey(int n)
                                   throws java.io.IOException
Specified by:
getHeaderFieldKey in interface javax.microedition.io.HttpConnection

openInputStream

public java.io.InputStream openInputStream()
                                    throws java.io.IOException
Specified by:
openInputStream in interface javax.microedition.io.InputConnection

openDataInputStream

public java.io.DataInputStream openDataInputStream()
                                            throws java.io.IOException
Specified by:
openDataInputStream in interface javax.microedition.io.InputConnection

openOutputStream

public java.io.OutputStream openOutputStream()
                                      throws java.io.IOException
Specified by:
openOutputStream in interface javax.microedition.io.OutputConnection

openDataOutputStream

public java.io.DataOutputStream openDataOutputStream()
                                              throws java.io.IOException
Specified by:
openDataOutputStream in interface javax.microedition.io.OutputConnection

getType

public java.lang.String getType()
Specified by:
getType in interface javax.microedition.io.ContentConnection

getEncoding

public java.lang.String getEncoding()
Specified by:
getEncoding in interface javax.microedition.io.ContentConnection

getLength

public long getLength()
Specified by:
getLength in interface javax.microedition.io.ContentConnection