Name
Package javax.microedition.io
Synopsis
This package contains the interfaces and classes that form the Generic Connection Framework. This framework provides a simpler and more uniform interface for accessing external devices, such as networks and serial communication ports, than the corresponding classes in J2SE.
The key elements of this package are the Connector class
and the Connection interface. The
Connector class contains static methods that
create specialized connections (i.e. objects that implement the
Connection interface) to various types of device or
network protocol. The Connector
open()
method accepts a name argument that describes the
connection target; it then returns an instance of a class that implements a
sub-interface of Connection suitable for the specified
protocol or device. Note that the actual classes that are returned are not
part of the public API, but the interfaces that they implement (e.g.,
HttpConnection) are all contained in this package.
The Generic Connection Framework is part of the CLDC specification. Although
it defines the framework and most of the interfaces in this package, it does
not require the implementation of any specific protocols. The
HttpConnection interface is introduced by the
MID profile rather than being part of CLDC. MIDP requires only that the HTTP
protocol be supported, although device vendors are free to implements
sockets, datagrams and other protocols according to the requirements of
their devices.
Although intended ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access