Skip to Main Content
Wireless Java
book

Wireless Java

by Qusay H. Mahmoud
January 2002
Intermediate to advanced content levelIntermediate to advanced
264 pages
8h 3m
English
O'Reilly Media, Inc.
Content preview from Wireless Java

MIDP Connectivity

The MIDP extends the CLDC Generic Connection Framework to provide support for the HTTP protocol. Why HTTP? Well, HTTP can be implemented using both IP protocols (such as TCP/IP) or non-IP protocols (such as WAP and I-mode). In the latter case, the device would have to utilize a gateway that could perform URL naming resolution to access the Internet, as shown in Figure 7-2.

The benefit of HTTP support

Figure 7-2. The benefit of HTTP support

Tip

All of the MIDP 1.0 implementations must provide support for the HTTP protocol. Therefore, we encourage you to only use protocols supported by the MIDP (i.e., HTTP), as this will allow the application to be portable across all mobile information devices.

The idea of having the MIDP support the HTTP protocol is very clever. For network programming, you can revert to the HTTP programming model, and your applications will run on any MIDP device, whether it is a GSM phone with a WAP stack, a phone with I-mode, a Palm VII wireless, or a handheld device with Bluetooth.

The HttpConnection Interface

The HttpConnection interface is part of the javax.microedition.io package. This interface defines the necessary methods and constants to exchange data through an HTTP connection. It has the following methods (the constants, which have been omitted here to save space, are documented in Appendix D):

public interface HttpConnection extends ContentConnection { // public ...
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.
Start your free trial

You might also like

Wireless J2ME™ Platform Programming

Wireless J2ME™ Platform Programming

Vartan Piroumian
Java Power Tools

Java Power Tools

John Ferguson Smart

Publisher Resources

ISBN: 0596002432Supplemental ContentCatalog PageErrata