• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • paul wheaton
  • Jeanne Boyarsky
  • Ron McLeod
Sheriffs:
  • Paul Clapham
  • Liutauras Vilda
  • Devaka Cooray
Saloon Keepers:
  • Tim Holloway
  • Roland Mueller
Bartenders:

RMS size

 
Ranch Hand
Posts: 47
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello

I created a Recordstore in my J2ME app and inserted some record in the RMS. each time I add and remove a record I print the size of the RMS. every time I add a record the size increases as expected. But when I remove a record the size doesn't decrease.

i added the print below...

after first entry
entries in RMS: 1
size of RMS is(bytes): 64

after adding 2de entry
entries in RMS: 2
size of RMS is(bytes): 112

after removing an entry
entries in RMS: 1
size of RMS is(bytes): 112
 
Saloon Keeper
Posts: 28492
210
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Check the javadocs. You may discover a compaction method.
 
jan dressen
Ranch Hand
Posts: 47
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
thanks for the reply, I checked the javadoc, but cant find anything like a compactor...
 
jan dressen
Ranch Hand
Posts: 47
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
anyone knows if this is normal RMS behaviour or a bug, or did i forgot something?
 
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hey J2ME RMS is different....
A record id when deleted just makes that record inaccessible ! you cant read it again nor edit it. hence if you want the size to reduce delete the whole record store and write all the records again.
Read some book abt J2ME RMS or better read the java docs for deleteRecord of RMS.

Thanks
 
The world's cheapest jedi mind trick: "Aw c'mon, why not read this tiny ad?"
Smokeless wood heat with a rocket mass heater
https://woodheat.net
reply
    Bookmark Topic Watch Topic
  • New Topic