BlackBerry Forums Support Community               

Closed Thread
 
LinkBack Thread Tools
Old 08-10-2008, 03:30 PM   #1 (permalink)
New Member
 
Join Date: Apr 2008
Model: 8830
PIN: N/A
Carrier: verizon
Posts: 9
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default text file question

Please Login to Remove!

I need to write to a text file in a way that won't overwrite whatever is in there already. Is this possible?

Is the only option to read the whole file into a string, add stuff to the end, and then write the whole thing to the file again?
Offline  
Old 08-10-2008, 04:08 PM   #2 (permalink)
BlackBerry Extraordinaire
 
Join Date: Jan 2006
Model: LEZ10
OS: 10.0.10
Carrier: Rogers CA
Posts: 1,704
Post Thanks: 20
Thanked 77 Times in 68 Posts
Default

Check out the API documentation for the interface FileConnection, in particular the methods: fileSize() and openOutputStream(long byteOffset).
Offline  
Old 08-10-2008, 04:22 PM   #3 (permalink)
New Member
 
Join Date: Apr 2008
Model: 8830
PIN: N/A
Carrier: verizon
Posts: 9
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default

sorry hrbuckley, I seem to be an idiot today.

I've been working on this thing for the entier weekend (relearning java as I go) and I'm very close to having it fully functional. I'm afraid that I didn't even notice that you could offset the point at which the writer starts writing even though I must have read and stared at the documentation for more then 2 total hours today.

Thanks again man, that should get me to where I want to go.
Offline  
Old 08-10-2008, 06:01 PM   #4 (permalink)
BlackBerry Extraordinaire
 
Join Date: Jan 2006
Model: LEZ10
OS: 10.0.10
Carrier: Rogers CA
Posts: 1,704
Post Thanks: 20
Thanked 77 Times in 68 Posts
Default

No problem. The javadocs are OK once you find your way around but they can be mind numbing. I've missed stuff like that too.
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

10 Pcs 6mm Shaft Hole Dia Plastic Threaded Knurled Potentiometer Knobs Caps RCA
$0.9
10 Pcs 6mm Shaft Hole Dia Plastic Threaded Knurled Potentiometer Knobs Caps RCA picture10 Pcs Black Silver Tone 19mm Top Rotary Knobs for 6mm Dia. Shaft Potentiometer
$9.08
10 Pcs Black Silver Tone 19mm Top Rotary Knobs for 6mm Dia. Shaft Potentiometer pictureCelesco Linear Potentiometer 5 inch stroke 1.25K – 10K ohms • IP67
$80.0
Celesco Linear Potentiometer 5 inch stroke 1.25K – 10K ohms • IP67 picture19 SMALL THREE POST RHEOSTATS POTENTIOMETERS
$19.95
19 SMALL THREE POST RHEOSTATS POTENTIOMETERS picture165889 Old-Stock, Yale 517085850 Potentiometer w/Gear
$59.49
165889 Old-Stock, Yale 517085850 Potentiometer w/Gear picture






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