I've written an application in lwuit where I use the RMS to store thousands of records, each with a unique id. Now I want to port/rewrite it to use lwuit IO library to make it portable to CodenameOne, but I've run into some challenges:
I'd appreciate tips on how to achive good performance with io library when I have thousands of records that may be stored and retrieved frequently and independently (beyond using CacheMap of cause ;-)
Maybe I've missed something, but it seems that without the above features, porting from RMS to lwuit.io is not straightforward.
http://stackoverflow.com/questions/11275975/how-to-use-codename-one-storageNikhil 2012-07-23 09:43
Spent the night, read the code instead of the documentation and realized that I misunderstood how Storage works ;-). When it talks about filenames, it is not actual (RMS) files, but entries into the RMS. So, to answer my own questions: 1) delete using deleteStorageFile(name); 2) use listEntries() ; 3) CacheMap is actually automatically used when using Storage, so no need to code it yourself. WIth this in mind, performance will be similar to RMS (probably better if you didn't use any caching before).