BlackBerry Forums Support Community
              

Closed Thread
 
LinkBack Thread Tools
Old 08-20-2009, 10:08 AM   #1 (permalink)
New Member
 
Join Date: Jul 2009
Model: None
PIN: N/A
Carrier: None
Posts: 2
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default writing from the end of the file - FileConnection or PrintOutPutStream

Please Login to Remove!

Hello all
Im a new blackberry developer and I was assigned to make a log for the app that Im working on. The log is supposed to be written in a file, but everytime the app is executed the new content is not supposed to overwrite the old one.
The thing is that I have not found an outputStream or a method that lets me place the cursor at the end of the file so I can start writing new content without overwriting the old.
So two questions in one:
If I specify:
fileCon = (FileConnection) Connector.open(_filePath, Connector.WRITE);
Does the writing status asures me that the OutPutStream that I get from fileCon.openDataOutputStream(); will have its cursor at the end of the file?

If not can you please tell me if there is a way to do this?
thanks in advance
Claudio Veas
Offline  
Old 09-14-2009, 09:57 PM   #2 (permalink)
Knows Where the Search Button Is
 
Join Date: Sep 2007
Model: 8100
PIN: N/A
Carrier: Vodafone
Posts: 18
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default

Use fconn.openOutputStream(fconn.fileSize()); to write to the EOF.
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

SIEMENS BG215, SINGLE POLE 120V , 15A , CIRCUIT BREAKER with switching neutral
$29.0
SIEMENS BG215,  SINGLE POLE 120V , 15A , CIRCUIT BREAKER with switching neutral picture4) NEW SQUARE D FINGERSAFE CONTACT BLOCK, 9001 KA2 LOT OF 4
$29.99
4) NEW SQUARE D FINGERSAFE CONTACT BLOCK, 9001 KA2  LOT OF 4  pictureKWIK SWITCH 200 1/2" DIA ENDMILL HOLDER END MILL MORE LISTED USA S1159
$49.0
KWIK SWITCH 200 1/2ACURA TAP COLLET SET 15943 USED ON KWIK SWITCH 200 & 300, CAT40 BT40 LOT C14251
$59.0
ACURA TAP COLLET SET 15943 USED ON KWIK SWITCH 200 & 300, CAT40 BT40 LOT C14251 picture(2) KWIK SWITCH 300 #1 MORSE TAPER HOLDERS 80326 MT LOT C5589
$29.0
(2) KWIK SWITCH 300 #1 MORSE TAPER HOLDERS 80326 MT LOT C5589 picture






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