Talk:FleConnection Example - JSR 75
This article describes how to use the FileConnection API (JSR-75) in Java ME. A code example is provided, showing how to save data to a text file stored on the mobile device, and also how to read from the text file. The article gives a nice overview of some of the things to watch out for when using the FileConnection API, such as the importance of exception handling. Another useful tip is the use of system properties to retrieve file paths, rather than hard-coding these into an application. Using system properties can help avoid errors which occur because of differences in the file paths used by different devices.
The code example is nicely commented to aid reader understanding. This article would serve as useful reading to anyone reading or writing to a file for the first time in Java ME. One thing to remember – the device must support JSR-75 in order to use this API, and not all devices do! The alternative is the make use of the Record Management System if persistent data storage is required.