BlackBerry Forums Support Community               

Closed Thread
 
LinkBack Thread Tools
Old 10-19-2007, 10:13 AM   #1 (permalink)
New Member
 
Join Date: Sep 2007
Model: none
PIN: N/A
Carrier: none
Posts: 7
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default Save data to file

Please Login to Remove!

Hi there,

is it possible to save data (Strings) to a text-file (concatenating the strings).
How can I do this?
Which file format is necessary?

Any hints are really appreciated!!!
Offline  
Old 10-19-2007, 06:43 PM   #2 (permalink)
New Member
 
Join Date: Oct 2007
Model: 8800
PIN: N/A
Carrier: rogers
Posts: 5
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default

it is possible using connector file system, i also working on this part.
hope it is help to you
Offline  
Old 10-22-2007, 02:08 AM   #3 (permalink)
New Member
 
Join Date: Sep 2007
Model: none
PIN: N/A
Carrier: none
Posts: 7
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default

Thank you hongfengw!

I think I managed to create a .txt-file.
How can I find and view this file on my windows machine? Is it stored in any folder? If not, is there any way to make this possible?

*HopesForHelpAgain*
Would really appreciate help!

Last edited by mr_pink23 : 10-22-2007 at 02:40 AM.
Offline  
Old 10-23-2007, 01:40 AM   #4 (permalink)
Knows Where the Search Button Is
 
Join Date: Oct 2007
Model: 8700
PIN: N/A
Carrier: none
Posts: 23
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default

i dont know whether this is correct but the location i think is in

\Research In Motion\BlackBerry JDE 4.2.1\simulator ..8800-sdcard.dmp
Offline  
Old 10-23-2007, 03:29 AM   #5 (permalink)
New Member
 
Join Date: Sep 2007
Model: none
PIN: N/A
Carrier: none
Posts: 7
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default

yep, but is there a way to acces the (e.g. .txt-file) directly?
i managed to access the file with input/outputstreams but it would be good to have a look by simply double-clicking it...

ideas?
Offline  
Old 10-23-2007, 04:35 AM   #6 (permalink)
Knows Where the Search Button Is
 
Join Date: Oct 2007
Model: 8700
PIN: N/A
Carrier: none
Posts: 23
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default

i dont know may be we have to extract the dmp file.
Offline  
Old 10-24-2007, 12:11 AM   #7 (permalink)
Knows Where the Search Button Is
 
Join Date: Oct 2007
Model: 8700
PIN: N/A
Carrier: none
Posts: 23
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default

if u have got the answer please do post because even i am working similar to that
Offline  
Old 10-24-2007, 08:55 AM   #8 (permalink)
CrackBerry Addict
 
Join Date: May 2005
Location: Golden, CO US
Model: 9700
Carrier: ATT
Posts: 684
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default

If you're simulating a device with a SDCard, you can tell the simulator to simply map the card to an existing directory on the Windows file system instead of the dmp file. Look at the fledge.exe help or use the JDWP app to start the simulator. It has the options.
Offline  
Old 10-24-2007, 09:16 AM   #9 (permalink)
Knows Where the Search Button Is
 
Join Date: Oct 2007
Model: 8700
PIN: N/A
Carrier: none
Posts: 23
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default

ok thanks for the response but if we want to put a text file into the internal memory of the blackberry simulator can we do this through windows do we have any direct location to place the files. because it doesnot show any location of the default files say some picture files which are present in the device memory of the simulator.i know the way of accessing the file from the device memory by just memtoining the path. can u use the same for txt files. can we load text files..

if i am wrong please do tell me
please help me regarding this
Offline  
Old 10-29-2007, 05:08 AM   #10 (permalink)
New Member
 
Join Date: Sep 2007
Model: none
PIN: N/A
Carrier: none
Posts: 7
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hi there,
any new ideas or further help?

I had a look at the fledge.exe help but couldn't manage to map a folder.
Some more details would certainly help an I really would appreciate it!!
Offline  
Old 10-31-2007, 06:42 AM   #11 (permalink)
Knows Where the Search Button Is
 
Join Date: Oct 2007
Model: 8700
PIN: N/A
Carrier: none
Posts: 23
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default

does any one got any ideas please do share
Offline  
Old 12-20-2007, 12:24 PM   #12 (permalink)
New Member
 
Join Date: Dec 2007
Model: 8100
PIN: N/A
Carrier: ATT
Posts: 1
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default Reading Text file

Alright I think I have everything set up that I need to read a text file, but I can't seem to get it to work. I am trying to do this without having to purchase a RIM key.

So far I have the file connected as shown in FileConnection, and I can tell whether or not that file exists successfully, but here is my question:

How do I read data (strings) out of that txt file. It is basically a line-delimited text file, the functions I really would like are readLine() and while(!file.EOF)

Any ideas of what I wma doing wrong?
Offline  
Old 12-23-2007, 11:46 AM   #13 (permalink)
Knows Where the Search Button Is
 
Join Date: Oct 2004
Model: 8800
Carrier: Vodafone
Posts: 29
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default

Here's the method I use to read a line of text, hope it helps you
Code:
	String receiveText() {
		int b = 0;
		StringBuffer sb = new StringBuffer();
		while (true) {
			try {
				b = in.read();
			}
			catch (IOException ie) {System.out.println(ie);}
			if (b < 0) {
				eofflag = true;
				break;
			}
			char c = (char)b;
			if (c == '\r') continue;
			if (c == '\n') break;
			sb.append(c);
		}
		return sb.toString();
	}
Best regards,
Malcolm
Welcome to Freepoc

Last edited by malbry : 12-24-2007 at 02:04 PM.
Offline  
Old 07-28-2008, 07:07 AM   #14 (permalink)
New Member
 
Join Date: Jun 2008
Model: 8830
PIN: N/A
Carrier: sprint
Posts: 2
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default unable to view sdcard .dmp file

Someone said earlier that you could view the .dmp sdcard file. can someone post how that is done ? I didn't see any settings in the simulator that let you have the files go to a directory instead of a file.

David J.
Offline  
Old 11-07-2008, 01:49 AM   #15 (permalink)
New Member
 
Join Date: Oct 2008
Model: 9000
PIN: N/A
Carrier: AT &T
Posts: 4
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default how to map windows directory to device simulator

Hi All, can anybody please tell me how to map windows directory to Device simulator.
I am posting a file through Http post to ASP page .I am able to post Text data to server..but for posting a file I need to map windows directory to device simulator.






Quote:
Originally Posted by RemyJ View Post
If you're simulating a device with a SDCard, you can tell the simulator to simply map the card to an existing directory on the Windows file system instead of the dmp file. Look at the fledge.exe help or use the JDWP app to start the simulator. It has the options.
Offline  
Closed Thread


Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On





Copyright 2004-2014 BlackBerryForums.com.
The names RIM and BlackBerry are registered Trademarks of BlackBerry Inc.