File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Java Micro Edition and the fly likes Storage options available in JavaME Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Mobile » Java Micro Edition
Bookmark "Storage options available in JavaME" Watch "Storage options available in JavaME" New topic

Storage options available in JavaME

Carl Jokl

Joined: Oct 09, 2008
Posts: 11
I have been teaching myself JavaME having had quite a bit of experience with Java but no real need to use JavaME in the business world anyway. I have a non profit project I am hoping to use it for outside of work. It is a kind of book reader but involves some books which are covered by intellectual property of the organisation I would be developing the project for.

I was hoping to draw on some peoples practical experience with mobile development. One of my biggest technical concern for the project is the issue of storage. As the books to be read are large the basic collection of books I have in another format is of the order of 10mb. Not very big in the grand scheme of things but this is the JavaME world. MIDP 2.0 seems to be widely supported and had the RecordStore class. Unfortunately the amount of storage granted to a midlet via that api can be stingy to say the least. My old Motorola V635 which I am using to try and test for older devices says it provides a mere 15K for the RecordStore. The phone has much more free space and 15K is nowhere near the amount of storage I need. Then we have JSR 75. This could get around the problem by having direct file system access. The downsides are that I am limited to this app only running on JSR 75 compliant phones. Secondly to access this api it seems most phones would require the midlet to be digitally signed. This is very expensive especially when this is a non profit project.

Are there any other storage methods available which I have not come across or covered here? Have anyone any practical advice or experience about using the RecordStore or JSR 75 such as how generous or not mobile implementations tend to be when it comes to storage. My new phone provides 2mb via the RecordStore (running JBlend). This is more generous but considering the massive amount of space the phone has available for storage it is still not all that generous. I also have the JavaFX mobile preview SDK which is very generous with it's storage provision. Unfortunately I suspect it is a lot more generous than other mobile VM's are likely to be.

I would really like to try as far as humanly possible to make this app support as many phones as possible and not tie it down only to the latest and greatest phones. I may have to compromise if there are some fundamental limitations which limit which devices I could practically make this work with.

Programming isn't about writing code. It is about managing complexity.
Aleksandar Babic
Ranch Hand

Joined: May 30, 2007
Posts: 68
As far as I know you have two options.
Using RecordStore or write data to file (jsr75).
For RecordStore usage I would suggest you to inspect "Floggy" framework.
If you save your data to file than you need to implement search etc.

Maybe there are some databases for mobile phones that can use memory cards space.
I'm also interested in solution, so if you find one paste it here
sivakumar arani

Joined: Jul 15, 2007
Posts: 14

For 10MB data storing in record store should work.

i have been storing some 100-200MB data in RMS.
You may need use multiple record stores.
most of medium to high end phones support this much space for storage

majety srikanth

Joined: Jan 25, 2011
Posts: 14
I think you are familiar with floggy. Please see this post and kindly help me if you can.
I agree. Here's the link:
subject: Storage options available in JavaME
It's not a secret anymore!