- BlackBerry Support Community Forums
- Welcome & Introductions
- Announcements
- Your Stories
- Smartphones
- BlackBerry® Bold™ 9700 smartphone
- BlackBerry® Tour™ 9630
- BlackBerry Storm - BlackBerry 9500 Series Smartphone
- BlackBerry Bold - BlackBerry 9000 Series Smartphone -
- BlackBerry Curve - BlackBerry 8900 Series Smartphone
- BlackBerry 8800 Series Smartphone
- BlackBerry Curve 8500 Series Smartphone
- BlackBerry Curve - BlackBerry 8300 Series Smartphone
- BlackBerry Pearl - BlackBerry 8200 Series Smartphone
- BlackBerry Pearl- BlackBerry 8100 Series Smartphone -
- Other BlackBerry Smartphones and Devices
- General BlackBerry Smartphone Functions and Features
- BlackBerry Accessories
- Software
- BlackBerry® Desktop Software
- BlackBerry® for Mac
- BlackBerry® Device Software
- BlackBerry® Applications, Third-Party Applications & BlackBerry App World
- BlackBerry App World - General Discussions
- Downloaded Applications for BlackBerry Devices
- Solutions
- BlackBerry® Enterprise Server Version 5.0
- BlackBerry® Enterprise Solution
- BlackBerry® Internet Service
- BlackBerry® Professional Software and BlackBerry® Unite!
- BlackBerry® Training and Certification
- BlackBerry® Training and Certification
- BCP-410
- BlackBerry Development
- Dev Blog
- BlackBerry App World™ Development
- Java Development
- Web Development
- MDS Runtime Development
- BlackBerry Enterprise Server Development
- Product Management: The BlackBerry Application Platform
- BlackBerry Themes & Animated Graphics
- Community Forums Feedback
- Forum Feedback and Ideas
- BlackBerry Community Post
- BlackBerry Community Post
- Register
- ·
- Sign In
- ·
- Help
- ·
- New Topics
- ·
- New Posts
- BlackBerry Support Community Forums
- :
- BlackBerry Development
- :
- Java Development
- :
- Writing to a file
- Subscribe to RSS Feed
- Mark Topic as Read
- Float this Topic to the Top
- Bookmark
- Subscribe
- Printer Friendly Page
Writing to a file
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Flag for a Moderator
11-03-2009 03:27 PM
I get the content of a entire xml file into a string ..i need to write this string to a xml file ...how can i do that...and where will the file be store in the simulator...?
Kaddy
Re: Writing to a file
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Flag for a Moderator
11-03-2009 07:19 PM
I need to do this for the version 4.2.1...please let me know...
Kaddy
Re: Writing to a file
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Flag for a Moderator
11-03-2009 07:50 PM
There is a sample writing a file here, that might get you going:
How To - Capture and save a screen shot
Article Number: DB-00752
http://www.blackberry.com/knowledgecenterpublic/li
You will find the FileExplorerDemo also very useful.
I presume you want to write to the SD Card?
Re: Writing to a file
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Flag for a Moderator
11-05-2009 01:17 PM
this we can use only with 4.3 and later i am using 4.2.1 ..and i want to be able to take the printout of the file many times to check..so file explorer is not a option....
Kaddy
Re: Writing to a file
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Flag for a Moderator
11-05-2009 03:42 PM
The KB article I gave you is 4.3 only because it does a Screenshot. That was not why I pointed you at it.
Do you see the code it uses to write a sequence of bytes out? That code will work in 4.2.1. So all you have to do is copy that code, and turn your String into bytes (which you can do with getBytes()) rather than doing the Screenshot
FileExplorerDemo is very useful, because it will show you how to traverse directories, you might want to do that in order to check what files you already have, so you don't overwrite something.
I suspect that with these and the API documentation, you have enough to do the coding you require.
Shortcut Navigation
Copyright © 2009 Research In Motion Limited, unless otherwise noted.






