So far, all the classes we have seen in the CLDC API have been a subset of the J2SE API. CLDC also includes one additional package -- the javax.microedition.io
package.
The only class defined in this package is the Connector
class, a factory class that contains methods to create Connection
objects, or input and output streams.
Connection
objects are created when a class name is identified dynamically. A class name is identified based on the platform name, as well as the protocol of the requested connection. The parameter string that describes the target adheres to the URL format required by the RFC 2396 specifications. Use the following format:
{scheme}:[{target}][{params}]
The {scheme}
is the name of a protocol such as http or ftp. {target}
is usually a network address, but non-network oriented protocols may treat this as a fairly flexible field. Any parameters, {params}
, are specified as a series of assignments of the form ";x=y" (for example, ;myParam=value
).