Storage on removable media
Accessing data on the microSD media card
The
javax.microedition.io.file
package supports the JSR 75 File Connection APIs and is used in applications to
access the file system for the microSD media card. You can also implement the
FileConnection
interface to access
BlackBerry® device ring tones and camera images.
Class or interface
Description
ConnectionClosedException
This exception is thrown when an application invokes a method on a closed file
connection.
FileConnection
An application can use this API to access files or directories.
FileSystemListener
An application can use this API to receive status notifications when the application
adds or removes a file system root.
FileSystemRegistry
An application can use this API as a central registry for file system listeners that
listen for the addition or removal of file systems.
IllegalModeException
This exception is thrown when a method requires a specific security mode (for
example READ or WRITE) and the open connection is not in that mode.
Backing up and synchronizing data
The BlackBerry® Desktop Manager provides a backup and restore tool that a BlackBerry device user can use to save BlackBerry
device data to a file on a computer and to restore data to the BlackBerry device.
When an application uses the Synchronization API, the BlackBerry Desktop Manager can back up and restore the application
database at the same time as other BlackBerry device databases. You can use the Synchronization API to create data archives
or to populate application databases the first time the BlackBerry device connects to the BlackBerry device user’s computer.
To synchronize data to remote data sources, you must build the synchronization logic into your BlackBerry Java® Application.
Most applications send data to a server-side application using standard HTTP or TCP/IP protocols over the wireless network and
the Internet or corporate intranet. You can use XML APIs to generate and parse XML-formatted data to send and receive over
the wireless network. However, your client-side and server-side applications must read and write the data properly and
acknowledge the successful transmission.
A BlackBerry Java Application might connect to a computer-based application to send the data over a USB connection using the
BlackBerry Desktop Synchronization APIs and the BlackBerry Desktop Manager. In this case, you must build an application for
Windows® that can read the data from the client through an add-in task for the BlackBerry Desktop Manager. The BlackBerry
Fundamentals Guide
Storage on removable media
29