JavaTM applications (MIDlets) may need to access native application data such as contact lists, or files stored on the device. Therefore, the current APIs that address data handling try to resolve the issues applications may face in the area, mainly handling persistent data and accessing databases on the device.
The javax.microedition.rms
package of the MIDP
2.0 specification allows you to store persistent data such as saved games
and high-score tables and later retrieve it. It does not enable writing or
reading data outside the RMS. For more information on this package, see Mobile Information
Device 2.0 (JSR-118) specification.
As a complement the javax.microedition.rms
package, PDA Optional Packages for the J2ME™
Platform (JSR-75) specification includes two optional packages.
The specification allows you to create, read, and write files and directories
located on mobile devices and external memory cards.
Of these optional packages, PIM API gives access to personal information management databases such as contact lists, calendars, and to-do lists, whereas File API allows you to access local file systems (for example, removable storage media such as an external memory card) residing on the device through the Generic Connection Framework (GCF). These two packages are completely independent of each other, and thus devices may contain either one or both.
The following developer's guides are available on data handling in this section.
Describes using the FileConnection API with MIDlets and provides an example MIDlet which creates a file browser that can be used to browse images in the stored file system and display them on the screen.
Describes using the PIM API with MIDlets and provides an example MIDlet which allows creating an event and sharing it with others.