BlackBerry Forums Support Community
              

Closed Thread
 
Thread Tools
Old 08-10-2008, 03:30 PM   #1
kmdcomp
New Member
 
Join Date: Apr 2008
Model: 8830
PIN: N/A
Carrier: verizon
Posts: 9
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
hrbuckley
BlackBerry Extraordinaire
 
Join Date: Jan 2006
Model: LEZ10
OS: 10.0.10
Carrier: Rogers CA
Posts: 1,704
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
kmdcomp
New Member
 
Join Date: Apr 2008
Model: 8830
PIN: N/A
Carrier: verizon
Posts: 9
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
hrbuckley
BlackBerry Extraordinaire
 
Join Date: Jan 2006
Model: LEZ10
OS: 10.0.10
Carrier: Rogers CA
Posts: 1,704
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



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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


AB 1747-L542 /B SLC 500 5/04 CPU PROCESSOR UNIT New Factory Sealed AB 1747L542 picture

AB 1747-L542 /B SLC 500 5/04 CPU PROCESSOR UNIT New Factory Sealed AB 1747L542

$334.57



NEW SEALED AB 1747-L541 /C SLC 500 SLC 5/04 CPU PROCESSOR UNIT MODULE US picture

NEW SEALED AB 1747-L541 /C SLC 500 SLC 5/04 CPU PROCESSOR UNIT MODULE US

$310.93



ALOKA Prosound Alpha 7  P/N EP558900BD CPU Board picture

ALOKA Prosound Alpha 7 P/N EP558900BD CPU Board

$1000.00



Allen-Bradley 1747-L542 SLC 500 5/04 CPU PROCESSOR UNIT picture

Allen-Bradley 1747-L542 SLC 500 5/04 CPU PROCESSOR UNIT

$89.00



Allen Bradley 1747-L542 SER C SLC 500 5/04 CPU PROCESSOR UNIT AB 1747L542 picture

Allen Bradley 1747-L542 SER C SLC 500 5/04 CPU PROCESSOR UNIT AB 1747L542

$306.80



New Factory Sealed AB 1747-L532 SER E SLC 500 PLC Processor Unit Module 1747L532 picture

New Factory Sealed AB 1747-L532 SER E SLC 500 PLC Processor Unit Module 1747L532

$382.39







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