|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--javax.microedition.io.Connector
This class is a place holder for the static methods used to create all the connection objects.
This is done by dynamically looking up a class the name of which is formed from the platform name and the protocol of the requested connection. The class name will take the form:
com.sun.cldc.io.{platform}.{protocol}.Protocol
The platform name is derived from the system by looking for the system property "j2me.platform". If this property key is not found or the associated class is not present then one of two default directories are used. These are called "j2me" and "j2se". If the property "j2me.configuration" is non-null then "j2me" is used, otherwise "j2se" is assumed.
The protocol name is derived from the parameter string describing the target of the connection. This takes the from:
{protocol}:[{target}][ {parms}]
The protocol name is used to find the appropriate class and stripped from the target
name before being passed to open() method of a new instanceation of the class.
See also: DatagramConnection
for information relating to datagram addressing
Field Summary | |
static int |
READ
Access mode |
static int |
READ_WRITE
Access mode |
static int |
WRITE
Access mode |
Method Summary | |
static Connection |
open(String name)
Create and open a Connection |
static Connection |
open(String name,
int mode)
Create and open a Connection |
static Connection |
open(String name,
int mode,
boolean timeouts)
Create and open a Connection |
static DataInputStream |
openDataInputStream(String name)
Create and open a connection input stream |
static DataOutputStream |
openDataOutputStream(String name)
Create and open a connection output stream |
static InputStream |
openInputStream(String name)
Create and open a connection input stream |
static OutputStream |
openOutputStream(String name)
Create and open a connection output stream |
Methods inherited from class java.lang.Object |
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
Field Detail |
public static final int READ
public static final int WRITE
public static final int READ_WRITE
Method Detail |
public static Connection open(String name) throws IOException
string
- The URL for the connectionpublic static Connection open(String name, int mode) throws IOException
string
- The URL for the connectionmode
- The access modepublic static Connection open(String name, int mode, boolean timeouts) throws IOException
string
- The URL for the connectionmode
- The access modetimeouts
- A flag to indicate that the called wants timeout exceptionspublic static DataInputStream openDataInputStream(String name) throws IOException
string
- The URL for the connectionpublic static DataOutputStream openDataOutputStream(String name) throws IOException
string
- The URL for the connectionpublic static InputStream openInputStream(String name) throws IOException
string
- The URL for the connectionpublic static OutputStream openOutputStream(String name) throws IOException
string
- The URL for the connection
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |