• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

RMS size

 
jan dressen
Ranch Hand
Posts: 47
  • Mark post as helpful
  • send pies
  • 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
 
Tim Holloway
Saloon Keeper
Posts: 18359
56
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • 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
  • 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
  • Quote
  • Report post to moderator
anyone knows if this is normal RMS behaviour or a bug, or did i forgot something?
 
Pradeep Gudipati
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
  • 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
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic