?? ConnectorService
public interface ConnectorService
The Connector Service should be called to create and open
javax.microedition.io.Connection
objects.
When an open*
method is called, the implementation of the Connector
Service will examine the specified name for a scheme. The Connector Service
will then look for a Connection Factory service which is registered with the
service property IO_SCHEME
which matches the scheme. The
createConnection
method of the selected Connection Factory will then
be called to create the actual Connection
object.
If more than one Connection Factory service is registered for a particular
scheme, the service with the highest ranking (as specified in its
service.ranking
property) is called. If there is a tie in ranking,
the service with the lowest service ID (as specified in its
service.id
property), that is the service that was registered first,
is called. This is the same algorithm used by
BundleContext.getServiceReference
.
-
????
????????????static final int
Read access mode.static final int
Read/Write access mode.static final int
Write access mode. -
????
??????????javax.microedition.io.Connection
Create and open aConnection
object for the specified name.javax.microedition.io.Connection
Create and open aConnection
object for the specified name and access mode.javax.microedition.io.Connection
Create and open aConnection
object for the specified name, access mode and timeouts.openDataInputStream
(String name) Create and open aDataInputStream
object for the specified name.openDataOutputStream
(String name) Create and open aDataOutputStream
object for the specified name.openInputStream
(String name) Create and open anInputStream
object for the specified name.openOutputStream
(String name) Create and open anOutputStream
object for the specified name.
-
??????
-
READ
static final int READRead access mode.- ????:
-
- "javax.microedition.io.Connector.READ"
- ?????
-
WRITE
static final int WRITEWrite access mode.- ????:
-
- "javax.microedition.io.Connector.WRITE"
- ?????
-
READ_WRITE
static final int READ_WRITERead/Write access mode.- ????:
-
- "javax.microedition.io.Connector.READ_WRITE"
- ?????
-
-
??????
-
open
Create and open aConnection
object for the specified name.- ??:
name
- The URI for the connection.- ??:
- A new
javax.microedition.io.Connection
object. - ??:
IllegalArgumentException
- If a parameter is invalid.javax.microedition.io.ConnectionNotFoundException
- If the connection cannot be found.IOException
- If some other kind of I/O error occurs.- ????:
-
- "javax.microedition.io.Connector.open(String name)"
-
open
Create and open aConnection
object for the specified name and access mode.- ??:
name
- The URI for the connection.mode
- The access mode.- ??:
- A new
javax.microedition.io.Connection
object. - ??:
IllegalArgumentException
- If a parameter is invalid.javax.microedition.io.ConnectionNotFoundException
- If the connection cannot be found.IOException
- If some other kind of I/O error occurs.- ????:
-
- "javax.microedition.io.Connector.open(String name, int mode)"
-
open
Create and open aConnection
object for the specified name, access mode and timeouts.- ??:
name
- The URI for the connection.mode
- The access mode.timeouts
- A flag to indicate that the caller wants timeout exceptions.- ??:
- A new
javax.microedition.io.Connection
object. - ??:
IllegalArgumentException
- If a parameter is invalid.javax.microedition.io.ConnectionNotFoundException
- If the connection cannot be found.IOException
- If some other kind of I/O error occurs.- ????:
-
- "javax.microedition.io.Connector.open(String name, int mode, boolean timeouts)"
-
openInputStream
Create and open anInputStream
object for the specified name.- ??:
name
- The URI for the connection.- ??:
- An
InputStream
object. - ??:
IllegalArgumentException
- If a parameter is invalid.javax.microedition.io.ConnectionNotFoundException
- If the connection cannot be found.IOException
- If some other kind of I/O error occurs.- ????:
-
- "javax.microedition.io.Connector.openInputStream(String name)"
-
openDataInputStream
Create and open aDataInputStream
object for the specified name.- ??:
name
- The URI for the connection.- ??:
- A
DataInputStream
object. - ??:
IllegalArgumentException
- If a parameter is invalid.javax.microedition.io.ConnectionNotFoundException
- If the connection cannot be found.IOException
- If some other kind of I/O error occurs.- ????:
-
- "javax.microedition.io.Connector.openDataInputStream(String name)"
-
openOutputStream
Create and open anOutputStream
object for the specified name.- ??:
name
- The URI for the connection.- ??:
- An
OutputStream
object. - ??:
IllegalArgumentException
- If a parameter is invalid.javax.microedition.io.ConnectionNotFoundException
- If the connection cannot be found.IOException
- If some other kind of I/O error occurs.- ????:
-
- "javax.microedition.io.Connector.openOutputStream(String name)"
-
openDataOutputStream
Create and open aDataOutputStream
object for the specified name.- ??:
name
- The URI for the connection.- ??:
- A
DataOutputStream
object. - ??:
IllegalArgumentException
- If a parameter is invalid.javax.microedition.io.ConnectionNotFoundException
- If the connection cannot be found.IOException
- If some other kind of I/O error occurs.- ????:
-
- "javax.microedition.io.Connector.openDataOutputStream(String name)"
-