org.microemu.cldc.http
Class Connection
java.lang.Object
org.microemu.cldc.http.Connection
- All Implemented Interfaces:
- javax.microedition.io.Connection, javax.microedition.io.ContentConnection, javax.microedition.io.HttpConnection, javax.microedition.io.InputConnection, javax.microedition.io.OutputConnection, javax.microedition.io.StreamConnection, org.microemu.microedition.io.ConnectionImplementation
- Direct Known Subclasses:
- Connection
public class Connection
- extends java.lang.Object
- implements javax.microedition.io.HttpConnection, org.microemu.microedition.io.ConnectionImplementation
| 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 |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
cn
protected java.net.URLConnection cn
connected
protected boolean connected
allowNetworkConnection
protected static boolean allowNetworkConnection
Connection
public Connection()
openConnection
public javax.microedition.io.Connection openConnection(java.lang.String name,
int mode,
boolean timeouts)
throws java.io.IOException
- Specified by:
openConnection in interface org.microemu.microedition.io.ConnectionImplementation
- Throws:
java.io.IOException
close
public void close()
throws java.io.IOException
- Specified by:
close in interface javax.microedition.io.Connection
- Throws:
java.io.IOException
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
- Throws:
java.io.IOException
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
- Throws:
java.io.IOException
getResponseCode
public int getResponseCode()
throws java.io.IOException
- Specified by:
getResponseCode in interface javax.microedition.io.HttpConnection
- Throws:
java.io.IOException
getResponseMessage
public java.lang.String getResponseMessage()
throws java.io.IOException
- Specified by:
getResponseMessage in interface javax.microedition.io.HttpConnection
- Throws:
java.io.IOException
getExpiration
public long getExpiration()
throws java.io.IOException
- Specified by:
getExpiration in interface javax.microedition.io.HttpConnection
- Throws:
java.io.IOException
getDate
public long getDate()
throws java.io.IOException
- Specified by:
getDate in interface javax.microedition.io.HttpConnection
- Throws:
java.io.IOException
getLastModified
public long getLastModified()
throws java.io.IOException
- Specified by:
getLastModified in interface javax.microedition.io.HttpConnection
- Throws:
java.io.IOException
getHeaderField
public java.lang.String getHeaderField(java.lang.String name)
throws java.io.IOException
- Specified by:
getHeaderField in interface javax.microedition.io.HttpConnection
- Throws:
java.io.IOException
getHeaderFieldInt
public int getHeaderFieldInt(java.lang.String name,
int def)
throws java.io.IOException
- Specified by:
getHeaderFieldInt in interface javax.microedition.io.HttpConnection
- Throws:
java.io.IOException
getHeaderFieldDate
public long getHeaderFieldDate(java.lang.String name,
long def)
throws java.io.IOException
- Specified by:
getHeaderFieldDate in interface javax.microedition.io.HttpConnection
- Throws:
java.io.IOException
getHeaderField
public java.lang.String getHeaderField(int n)
throws java.io.IOException
- Specified by:
getHeaderField in interface javax.microedition.io.HttpConnection
- Throws:
java.io.IOException
getHeaderFieldKey
public java.lang.String getHeaderFieldKey(int n)
throws java.io.IOException
- Specified by:
getHeaderFieldKey in interface javax.microedition.io.HttpConnection
- Throws:
java.io.IOException
openInputStream
public java.io.InputStream openInputStream()
throws java.io.IOException
- Specified by:
openInputStream in interface javax.microedition.io.InputConnection
- Throws:
java.io.IOException
openDataInputStream
public java.io.DataInputStream openDataInputStream()
throws java.io.IOException
- Specified by:
openDataInputStream in interface javax.microedition.io.InputConnection
- Throws:
java.io.IOException
openOutputStream
public java.io.OutputStream openOutputStream()
throws java.io.IOException
- Specified by:
openOutputStream in interface javax.microedition.io.OutputConnection
- Throws:
java.io.IOException
openDataOutputStream
public java.io.DataOutputStream openDataOutputStream()
throws java.io.IOException
- Specified by:
openDataOutputStream in interface javax.microedition.io.OutputConnection
- Throws:
java.io.IOException
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
isAllowNetworkConnection
public static boolean isAllowNetworkConnection()
setAllowNetworkConnection
public static void setAllowNetworkConnection(boolean allowNetworkConnection)
Copyright © 2001-2009 MicroEmulator Team. All Rights Reserved.