Please note that as of October 24, 2014, the Nokia Developer Wiki will no longer be accepting user contributions, including new entries, edits and comments, as we begin transitioning to our new home, in the Windows Phone Development Wiki. We plan to move over the majority of the existing entries. Thanks for all your past and future contributions.

Revision as of 01:30, 29 July 2013 by hamishwillee (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

File Connection API (JSR 75)

From Wiki
Jump to: navigation, search
Article Metadata
Created: wang_shui (19 Mar 2007)
Last edited: hamishwillee (29 Jul 2013)

FileConnection API (which is an optional package of JSR-75) allows developer to access local file systems on the phone (like RAM or flash card) and read and write files, such as text, image, audio and video files.

This API is not meant to be a replacement for the Record Management System (RMS) but rather a complement to it allowing MIDlets to interact with native applications. For example, a MIDlet could access and manipulate images previously captured by a native application using a built-in digital camera.

Java ME devices use Generic Connection Framework (GCF) for Input / Output operations, by means of Connection interface implementations specific to each connection type. The different Connection extensions are built using a URL adequate to the different connection types with a protocol such as http://, sockets://, and so on. This API uses file:// as a protocol, and have a FileConnection interface that is inserted inside GCF.

The API allows you to receive the roots available on the file system (like drives in desktop systems) and the files on every folder.

Special Folders

In many Nokia devices, you can get an special folder using System properties, like, fileconn.dir.videos, fileconn.dir.tones and fileconn.dir.memorycard.

External Resources

JCP specification:

Nokia resources:

Sun resources:

Sony Ericsson resources:

This page was last modified on 29 July 2013, at 01:30.
78 page views in the last 30 days.