Motorola Inc. | i88s J2ME Developers’ Guide |
•If a MIDlet suite is updated to another version, then the file(s) associated with the current version of MIDlet suite, can be maintained for the new version to use. The user is prompted to keep the old data or delete it.
•If the MIDlet suite is deleted, all files associated with it are deleted.
•It is the MIDlets responsibility to coordinate the use of multiple threads to access a file since unintended consequences may result.
•Whenever you close a file, the close command will not return until all the pending writes have been completed; thus closing a file guarantees that all of the data was written. It is then safe to power off the device. One consequence is that the close command may take a while to return. Therefore, if you open and close the file every time a write is required, performance will be greatly affected.
3.6Caveats
•This File Access System is a sequential system. This means once you write particular chunk of data to the file you can’t go back and manipulate it.
•The maximum number of files that the i88s phone supports is 1024. Once the phone contains 1024 files, it will not be able to create more. MIDI ringers, voice notes, wallpapers, PNG images included with a MIDlet etc. are all files. If a MIDlet is to have many images, such as sprites used in animations, it may be advantageous to have them all in one image file and use clipping to display only what you need.
•A file can be of any size as long as file space is available. A zero byte file is also allowed.
•It is recommended that only 15 files remain open at one time. Exceeding the maximum number of opened files can result in unintended behavior.
•The InputStream method markSupported() method returns true only if the file open mode is READ or APPEND. This means that in any other file open mode, the mark() and reset() methods do not work.
•In the InputStream method mark(), the readlimit argument tells the input stream to allow that many bytes to be read before the mark position gets invalidated. Since this operation is on a file, “remembering” the entire contents of stream/file does not incur any type of cost, so the readlimit parameter is ignored preventing mark position invalidation.
Version 1.0 - Page 28