|
DCT Lightfoot v3 API specification | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Object
|
+--com.dctl.j2me.io.BaseConnection
|
+--com.dctl.j2me.io.http.BaseHttpConnection
|
+--com.dctl.j2me.io.httpserver.HttpServerSocket
An http server socket. Much like an http connection, but has states the other way around
| Field Summary |
| Fields inherited from class com.dctl.j2me.io.http.BaseHttpConnection |
ACCEPT_PROPERTY, ACCEPT_VALUE, ASCTIME, CHUNKED_ENCODING, CLOSED, COLON_SPACE, COMMA, CONNECTION_CLOSE, CONNECTION_KEEP_ALIVE, CONNECTION_PROPERTY, CONTENT_ENCODING_PROPERTY, CONTENT_LENGTH_PROPERTY, CONTENT_TYPE_PROPERTY, CRLF, DASH, DATE_PROPERTY, DAY, EXPIRES_PROPERTY, FIELDS, handle, HOST_PROPERTY, HOUR, inputNames, inputProperties, is, LAST_MODIFIED_PROPERTY, method, MIN, MONTH, MONTH_STRING, opens, os, outputProperties, PROTOCOL, RECEIVING, responseCode, responseMessage, RFC1123, RFC850, SEC, SENDING, SETUP, SPACE, state, TRANSFER_ENCODING_PROPERTY, USER_AGENT_PROPERTY, USER_AGENT_VALUE, VERSION, YEAR |
| Fields inherited from class com.dctl.j2me.io.BaseConnection |
protocol |
| Constructor Summary | |
HttpServerSocket(int handle,
java.lang.String address,
int port)
Create a new connection given the handle |
|
| Method Summary | |
protected java.lang.String |
generateFirstOutput()
Generate the first line of output |
java.lang.String |
getRequestField(java.lang.String name)
Get a request field |
long |
getRequestFieldDate(java.lang.String name,
int defaultValue)
Get a request field as a date |
int |
getRequestFieldInt(java.lang.String name,
int defaultValue)
Get a request field as an integer |
java.lang.String |
getRequestProperty(java.lang.String key)
Read a request property |
java.lang.String |
getURL()
Get the URL |
protected boolean |
handleFirstInput(java.lang.String line)
Handle the first input line |
protected void |
openConnection()
Open connection. |
InputStream |
openInputStream()
Open the input stream |
OutputStream |
openOutputStream()
Open the output stream |
void |
recycle()
Recycle the connection |
void |
setParameters(java.lang.String url,
int mode,
boolean timeouts)
Set the parameters |
void |
setResponseCode(int code)
Set the response code |
void |
setResponseMessage(java.lang.String message)
Set the response message |
void |
setResponseProperty(java.lang.String name,
java.lang.String value)
Set a response property |
| Methods inherited from class com.dctl.j2me.io.http.BaseHttpConnection |
close, getFieldDate, getFieldInt, getFile, getHost, getInputFieldKey, getPort, getProtocol, getQuery, getRef, getRequestMethod, invalidState, openDataInputStream, openDataOutputStream, parseInput, sendOutput, setRequestMethod |
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface javax.microedition.io.InputConnection |
openDataInputStream |
| Methods inherited from interface javax.microedition.io.Connection |
close |
| Methods inherited from interface javax.microedition.io.OutputConnection |
openDataOutputStream |
| Constructor Detail |
public HttpServerSocket(int handle,
java.lang.String address,
int port)
handle - The handle to useaddress - The addressport - The port| Method Detail |
public void recycle()
recycle in class BaseHttpConnection
protected void openConnection()
throws IOException
openConnection in class BaseHttpConnectionIOException - because it has to
public void setParameters(java.lang.String url,
int mode,
boolean timeouts)
throws IOException
setParameters in class BaseConnectionurl - The url passed inmode - The modetimeouts - true if timeout exceptions should occur
IOException - if there is an error
protected final boolean handleFirstInput(java.lang.String line)
throws IOException
handleFirstInput in class BaseHttpConnectionline - The first input line
IOException - if the line is incorrectprotected final java.lang.String generateFirstOutput()
generateFirstOutput in class BaseHttpConnectionIOException - if there is an error
public java.lang.String getRequestProperty(java.lang.String key)
throws IOException
key - The property to read
IOException - if there is an errorpublic void setResponseCode(int code)
code - The code to setpublic void setResponseMessage(java.lang.String message)
message - The message to send
public int getRequestFieldInt(java.lang.String name,
int defaultValue)
throws IOException
name - The name of the request fielddefaultValue - The default value
IOException - if there is an error
public long getRequestFieldDate(java.lang.String name,
int defaultValue)
throws IOException
name - The name of the request fielddefaultValue - the default value
IOException - if there is an error
public java.lang.String getRequestField(java.lang.String name)
throws IOException
name - The name of the request field
IOException - if there is an errorpublic java.lang.String getURL()
getURL in class BaseHttpConnection
public void setResponseProperty(java.lang.String name,
java.lang.String value)
throws IOException
name - The name of the response fieldvalue - The value
IOException - if there is an error
public InputStream openInputStream()
throws IOException
openInputStream in interface InputConnectionopenInputStream in class BaseHttpConnectionIOException - if there is an error
public OutputStream openOutputStream()
throws IOException
openOutputStream in interface OutputConnectionopenOutputStream in class BaseHttpConnectionIOException - 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 | ||||||||||