|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectjavax.microedition.io.Connector
public class Connector
This is a factory class to create different data connections, such as Bluetooth or USB. Currently it only supports Bluetooth SPP (btspp://).
| Field Summary | |
|---|---|
static int |
READ
Access mode READ. |
static int |
READ_WRITE
Access mode READ_WRITE. |
static int |
WRITE
Access mode WRITE. |
| 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 |
|---|
clone, 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
name - The URL for the connection.
IllegalArgumentException - - If a parameter is invalid.
ConnectionNotFoundException - - If the requested connection cannot be made,
or the protocol type does not exist.
IOException - - If some other kind of I/O error occurs.
public static Connection open(String name,
int mode)
throws IOException
name - The URL for the connection.mode - The mode for connection (READ, WRITE, READ_WRITE)
IllegalArgumentException - - If a parameter is invalid.
ConnectionNotFoundException - - If the requested connection cannot be made,
or the protocol type does not exist.
IOException - - If some other kind of I/O error occurs.
public static Connection open(String name,
int mode,
boolean timeouts)
throws IOException
name - The URL for the connection.mode - The mode for connection (READ, WRITE, READ_WRITE)timeouts -
IllegalArgumentException - - If a parameter is invalid.
ConnectionNotFoundException - - If the requested connection cannot be made,
or the protocol type does not exist.
IOException - - If some other kind of I/O error occurs.
public static DataInputStream openDataInputStream(String name)
throws IOException
name - The URL for the connection stream.
IOException
public static DataOutputStream openDataOutputStream(String name)
throws IOException
name - The URL for the connection.
IOException
public static InputStream openInputStream(String name)
throws IOException
name - The URL for the connection.
IOException
public static OutputStream openOutputStream(String name)
throws IOException
name - The URL for the connection.
IOException
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||