Go to Post This thread should surface like this before every new season. It is motivating and inspiring. And jawdropping. - JaneYoung [more]
Home
Go Back   Chief Delphi > Technical > Programming > Java
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
 
 
Thread Tools Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Spotlight this post!  
Unread 19-01-2014, 17:47
blanketboyjo blanketboyjo is offline
Registered User
FRC #0687
 
Join Date: Jan 2014
Location: Southern California
Posts: 2
blanketboyjo is an unknown quantity at this point
File IO without overwriting file

Hi, so I am trying to make the CRIO print out to a text file that I can read through ftp. I have it working to make the file, but everytime the code runs it overwrites the file, is there any way to make it so that new lines are added to the existing file?
Code:
PrintStream writer;
DataOutputStream myFile;
FileConnection con;

try {
con = (FileConnection)Connector.open("file:///test.txt", Connector.WRITE);
con.create();
myFile = con.openDataOutputStream();
writer = new PrintStream(myFile);
} catch (Exception e) {
}
writer.println("Message");

Last edited by blanketboyjo : 19-01-2014 at 17:47. Reason: snipped code
Reply With Quote
 


Thread Tools
Display Modes Rate This Thread
Rate This 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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -5. The time now is 08:39.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi