In MIDP, as in J2SE, IO streams are the primary mechanism available to applications to read and write streams of data. In addition to , the MIDP defines the package in contrast to , which supports networking and communications for MIDP applications. MIDP applications use the types to create and manipulate various kinds of network connections. They then read from these connections and write to them using the types in the MIDP package, which contains a subset of the classes and interfaces in the J2SE package | MIDP Programming Networking Chapter Objectives The CLDC Streams Model Generic Connection Framework (GCF) Supported Protocols Creating a Connection Review of HTTP Making an HTTP Request Building a CGI String Design Tips Differences between J2ME and J2SE Networking The CLDC Streams Model In MIDP, as in J2SE, IO streams are the primary mechanism available to applications to read and write streams of data. In addition to , the MIDP defines the package in contrast to , which supports networking and communications for MIDP applications. MIDP applications use the types to create and manipulate various kinds of network connections. They then read from these connections and write to them using the types in the MIDP package, which contains a subset of the classes and interfaces in the J2SE package. Generic Connection Framework CLDC specifies a generic connection mechanism Leaves considerable flexibility to . | MIDP Programming Networking Chapter Objectives The CLDC Streams Model Generic Connection Framework (GCF) Supported Protocols Creating a Connection Review of HTTP Making an HTTP Request Building a CGI String Design Tips Differences between J2ME and J2SE Networking The CLDC Streams Model In MIDP, as in J2SE, IO streams are the primary mechanism available to applications to read and write streams of data. In addition to , the MIDP defines the package in contrast to , which supports networking and communications for MIDP applications. MIDP applications use the types to create and manipulate various kinds of network connections. They then read from these connections and write to them using the types in the MIDP package, which contains a subset of the classes and interfaces in the J2SE package. Generic Connection Framework CLDC specifies a generic connection mechanism Leaves considerable flexibility to implementations Capable of supporting many different kinds of connections, from serial ports through wireless networking The fundamental idea: Give an URL-like string to the framework Get back something that has input and output streams Connection and its Family Connection represents some kind of I/O connection It has subinterfaces that define more specific connection types Making a Connection Connector is a Connection factory Pass a URL-style string to open(), get back some Connection implementation MIDP says that HTTP must be supported Other connection types are optional Note that HTTP does not have to run over TCP/IP Connection protocol support ("socket://"); (""); ("datagram://"); ("file://"); Opening a connection public static Connection open(String name) public static Connection open(String name, int mode) public static Connection open(String name, int mode, .