Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Java Development

Reply
Developer
prasadr
Posts: 51
Registered: ‎10-21-2008
My Device: Bold 9000

Store information in text/binary files

Hi,

 

In my blackberry application I want to store some information which enter bu users. Can I save these in text/binary file. If so How can I read/write/Modify/Delete these informations. Any tutorial or sample available. Appreciate your help on this.

 

Thank you.

 

Prasad

Developer
karan127
Posts: 101
Registered: ‎07-20-2009
My Device: Not Specified

Re: Store information in text/binary files

You can use FileConnection class for all file operations.

 

Also, you can use PersistantStore class for storing objects into memory.

 

If you are using OS 5.0 then you can actually use SQLite for data storage.

Developer
peter_strange
Posts: 19,612
Registered: ‎07-14-2008
My Device: Not Specified

Re: Store information in text/binary files

This is always a good place to start looking for information:

 

http://na.blackberry.com/eng/developers/resources/

 

There is a good tutorial:

http://na.blackberry.com/developers/resources/A13_Storing_Persistent_Data_V2.pdf

 

And some documentation:

http://docs.blackberry.com/en/developers/deliverables/11938/Storing_data_509304_11.jsp

 

SQLite is covered separately.

 

From the requirements you have stated, I agree with the kara127 that the FileConnection API seems like the best fit.