|
DCT Lightfoot v3 API specification | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
This interface defines an HTTP connection
| Field Summary | |
static java.lang.String |
GET
The string for a get method |
static java.lang.String |
HEAD
The string for a head method |
static int |
HTTP_ACCEPTED
The request has been accepted for processing but has not been completed |
static int |
HTTP_BAD_GATEWAY
The server received an invalid response that it was acting as a gateway for |
static int |
HTTP_BAD_METHOD
The method specified is not allowed |
static int |
HTTP_BAD_REQUEST
The request could not be understood by the server |
static int |
HTTP_CLIENT_TIMEOUT
The client did not produce a request within the time that the server was prepared to wait |
static int |
HTTP_CONFLICT
The server could not complete the request due to a conflict with the current state of the resource |
static int |
HTTP_CREATED
The request has been fulfilled and resulted in a new resource being created |
static int |
HTTP_ENTITY_TOO_LARGE
The server cannot process the request because the request is larger than the server can process |
static int |
HTTP_EXPECT_FAILED
The value in the expect request-header field could not be met by the server |
static int |
HTTP_FORBIDDEN
The server understood the request but is refusing to fulfill it |
static int |
HTTP_GATEWAY_TIMEOUT
The server acting as a gateway timedout |
static int |
HTTP_GONE
The resource is no longer available at the server |
static int |
HTTP_INTERNAL_ERROR
The server had an internal error |
static int |
HTTP_LENGTH_REQUIRED
The server needs a content length field |
static int |
HTTP_MOVED_PERM
The resource has been permanently moved to another location |
static int |
HTTP_MOVED_TEMP
The resource has been temporarily moved to another location |
static int |
HTTP_MULT_CHOICE
The resource has been moved to another one of many locations |
static int |
HTTP_NO_CONTENT
There is no content |
static int |
HTTP_NOT_ACCEPTABLE
The request is not acceptable to the server |
static int |
HTTP_NOT_AUTHORITATIVE
The returned entity header is not the definitive information |
static int |
HTTP_NOT_FOUND
The server has not found anything |
static int |
HTTP_NOT_IMPLEMENTED
The server does not implement the functionality to fulfill the request |
static int |
HTTP_NOT_MODIFIED
The server has allowed a get request, but has not modified the document |
static int |
HTTP_OK
The request has suceeded |
static int |
HTTP_PARTIAL
The server has fulfilled a partial get request |
static int |
HTTP_PAYMENT_REQUIRED
Reserved |
static int |
HTTP_PRECON_FAILED
The precondition of a request header failed |
static int |
HTTP_PROXY_AUTH
The client must authenticate itself to a proxy |
static int |
HTTP_REQ_TOO_LONG
The request is too long |
static int |
HTTP_RESET
The request has suceeded but the client should reset the document view |
static int |
HTTP_SEE_OTHER
The response can be found under a different URI |
static int |
HTTP_TEMP_REDIRECT
The resource is temporarily somewhere else |
static int |
HTTP_UNAUTHORIZED
The request requires user authentication |
static int |
HTTP_UNAVAILABLE
The server cannot handle the request due to an overload |
static int |
HTTP_UNSUPPORTED_RANGE
A range specified by a range request-header field is out of range |
static int |
HTTP_UNSUPPORTED_TYPE
The server does not support the type |
static int |
HTTP_USE_PROXY
The resource must be accessed via a proxy |
static int |
HTTP_VERSION
The server does not support the HTTP protocol version |
static java.lang.String |
POST
The string for a post method |
static java.lang.String |
PUT
The string for a put method |
| Method Summary | |
long |
getDate()
Get the date header field |
long |
getExpiration()
Get the expires header field |
java.lang.String |
getFile()
Get the file portion of the URL |
java.lang.String |
getHeaderField(int index)
Get a header field indexed by the index |
java.lang.String |
getHeaderField(java.lang.String name)
Get the header field |
long |
getHeaderFieldDate(java.lang.String name,
long defaultValue)
Get a header field parsed as a date value |
int |
getHeaderFieldInt(java.lang.String name,
int defaultValue)
Get a header field parsed as a number |
java.lang.String |
getHeaderFieldKey(int index)
Get the header field key at the index |
java.lang.String |
getHost()
Get the host to connect to |
long |
getLastModified()
Get the last modified date |
int |
getPort()
Get the port of the URL |
java.lang.String |
getProtocol()
Get the protocol used for the connection |
java.lang.String |
getQuery()
Get the query portion of the URL - after the last question mark |
java.lang.String |
getRef()
Get the ref portion of the URL |
java.lang.String |
getRequestMethod()
Get the request method |
java.lang.String |
getRequestProperty(java.lang.String key)
Get the request property specified by the key |
int |
getResponseCode()
Get the response code |
java.lang.String |
getResponseMessage()
Get the response message |
java.lang.String |
getURL()
Get the URL |
void |
setRequestMethod(java.lang.String method)
Set the request method - only valid until the request has been got |
void |
setRequestProperty(java.lang.String key,
java.lang.String value)
Set the request property for thekey |
| Methods inherited from interface javax.microedition.io.ContentConnection |
getEncoding, getLength, getType |
| Methods inherited from interface javax.microedition.io.InputConnection |
openDataInputStream, openInputStream |
| Methods inherited from interface javax.microedition.io.Connection |
close |
| Methods inherited from interface javax.microedition.io.OutputConnection |
openDataOutputStream, openOutputStream |
| Field Detail |
public static final java.lang.String GET
public static final java.lang.String HEAD
public static final java.lang.String POST
public static final java.lang.String PUT
public static final int HTTP_ACCEPTED
public static final int HTTP_BAD_GATEWAY
public static final int HTTP_BAD_METHOD
public static final int HTTP_BAD_REQUEST
public static final int HTTP_CLIENT_TIMEOUT
public static final int HTTP_CONFLICT
public static final int HTTP_CREATED
public static final int HTTP_ENTITY_TOO_LARGE
public static final int HTTP_EXPECT_FAILED
public static final int HTTP_FORBIDDEN
public static final int HTTP_GATEWAY_TIMEOUT
public static final int HTTP_GONE
public static final int HTTP_INTERNAL_ERROR
public static final int HTTP_LENGTH_REQUIRED
public static final int HTTP_MOVED_PERM
public static final int HTTP_MOVED_TEMP
public static final int HTTP_MULT_CHOICE
public static final int HTTP_NO_CONTENT
public static final int HTTP_NOT_ACCEPTABLE
public static final int HTTP_NOT_AUTHORITATIVE
public static final int HTTP_NOT_FOUND
public static final int HTTP_NOT_IMPLEMENTED
public static final int HTTP_NOT_MODIFIED
public static final int HTTP_OK
public static final int HTTP_PARTIAL
public static final int HTTP_PAYMENT_REQUIRED
public static final int HTTP_PRECON_FAILED
public static final int HTTP_PROXY_AUTH
public static final int HTTP_REQ_TOO_LONG
public static final int HTTP_RESET
public static final int HTTP_SEE_OTHER
public static final int HTTP_TEMP_REDIRECT
public static final int HTTP_UNAUTHORIZED
public static final int HTTP_UNAVAILABLE
public static final int HTTP_UNSUPPORTED_RANGE
public static final int HTTP_UNSUPPORTED_TYPE
public static final int HTTP_USE_PROXY
public static final int HTTP_VERSION
| Method Detail |
public java.lang.String getFile()
public java.lang.String getURL()
public java.lang.String getProtocol()
public java.lang.String getHost()
public java.lang.String getRef()
public java.lang.String getQuery()
public int getPort()
public java.lang.String getRequestMethod()
public void setRequestMethod(java.lang.String method)
throws IOException
method - The request method
IOException - if the request has already been sent or the method is not validpublic java.lang.String getRequestProperty(java.lang.String key)
key - The request property to get
public void setRequestProperty(java.lang.String key,
java.lang.String value)
throws IOException
key - The keyvalue - The value
IOException - if there is an error
public int getResponseCode()
throws IOException
IOException - if there is an error
public java.lang.String getResponseMessage()
throws IOException
IOException - if there is an error
public long getExpiration()
throws IOException
IOException - if there is an error
public long getDate()
throws IOException
IOException - if there is an error
public long getLastModified()
throws IOException
IOException - if there is an error
public java.lang.String getHeaderField(java.lang.String name)
throws IOException
name - The name of the header field
IOException - if there is an error
public int getHeaderFieldInt(java.lang.String name,
int defaultValue)
throws IOException
name - The name of the fielddefaultValue - The default value to use if the field cannot be
parsed or if it does not exist
IOException - if there is an error
public long getHeaderFieldDate(java.lang.String name,
long defaultValue)
throws IOException
name - Thename of the fielddefaultValue - The default value to use if the field cannot be
parsed or if it does not exist
IOException - if there is an error
public java.lang.String getHeaderField(int index)
throws IOException
index - The index
IOException - if there is an error
public java.lang.String getHeaderFieldKey(int index)
throws IOException
index - the index
IOException - if there is an error
|
DCT Lightfoot v3 API specification | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||