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

Resistance 1K LA42DWQ-22 Governor 22mm Rotary Potentiometer Inverter Converter
$4.2
Resistance 1K LA42DWQ-22 Governor 22mm Rotary Potentiometer Inverter Converter pictureResistance 10K LA42DWQ-22 Governor 22mm Rotary Potentiometer Inverter Converter
$4.2
Resistance 10K LA42DWQ-22 Governor 22mm Rotary Potentiometer Inverter Converter pictureGenerac iQ 2000 Watt Ultra Quiet Gasoline Powered Inverter Portable Generator
$689.0
Generac iQ 2000 Watt Ultra Quiet Gasoline Powered Inverter Portable Generator pictureAlpha xm2-915 uninterruptible power supply with inverter module look
$765.43
Alpha xm2-915 uninterruptible power supply with inverter module look  picture1Pcs Used Mitsubishi Inverter 0.75Kw 220V Tested Fr-D720s-0.75K-Cht Z
$139.88
1Pcs Used Mitsubishi Inverter 0.75Kw 220V Tested Fr-D720s-0.75K-Cht Z picture






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