Java Reference
In-Depth Information
Heavily streamlined, this package omits access to the native file system, but it offers
limited internationalization through the InputStreamReader and OutputStreamWriter
classes, which accept an optional string indicating the character-encoding method.
Introducing Classes in the CLDC
The key introduction of the CLDC—which found its way into the CDC as well—is the
GCF, which was described first in the CLDC 1.0 documentation and later provided with a
migration path to Java SE in JSR 197.
The GCF provides a unified means to interact with networks over a variety of
protocols, including but not limited to HTTP, TCP, and UDP. Using a URL schema
for connection definition, clients obtain instances of a Connection subclass from the
Connector factory and perform I/O over the Connection subclass. Table 2-5 lists the
classes available. Chapter 12 describes the GCF in more detail, including examples of
its use. In addition to these classes, packages such as the MIDP, the Foundation Profile
for CDC, and the GCF for Java SE include additional connections, such as a connection
that implements support for HTTP.
Table 2-5. The javax.microedition.io Classes Supported by CLDC Version
CLDC 1.0
CLDC 1.1
Connection
Connection
ConnectionNotFoundException
ConnectionNotFoundException
Connector
Connector
ContentConnection
ContentConnection
Datagram
Datagram
StreamConnectionNotifier
StreamConnectionNotifier
InputConnection
InputConnection
OutputConnection
OutputConnection
DatagramConnection
DatagramConnection
StreamConnection
StreamConnection
Besides its importance in providing CLDC applications with a path to communicat-
ing with the outside world, the GCF provides an object lesson in where Java ME is
headed: into Java SE. As portable devices continue to become more full-featured, the
innovations necessary to bring Java to those devices will likely become mainstream parts
of the Java SE interface.
 
Search WWH ::




Custom Search