Go to Post the golden rule of robotics for the 21st century: Do unto robots as you would have them do unto you - KenWittlief [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
  #13   Spotlight this post!  
Unread 01-28-2014, 01:20 PM
JohnGilb JohnGilb is offline
Programming Mentor, Drive Mentor
FRC #0488
 
Join Date: Mar 2011
Rookie Year: 2003
Location: Redmond, WA
Posts: 114
JohnGilb has a spectacular aura aboutJohnGilb has a spectacular aura aboutJohnGilb has a spectacular aura about
Re: File IO without overwriting file

If we can't get a generic append function working, we'll probably go with multiple incrementing log files, but there are some downsides:

-Since the robot can terminate unexpectedly, we have to flush our buffer fairly often to make sure we don't lose data due to a power failure or unexpected reboot
-Too many small files is a pain to read and process, so we would need to find a balance

I'll try to get more detail about our current IO exception (also, does anybody else have that problem where FileConnection.fileSize() returns an enormous number?), and if that doesn't work out, implement a solution like joelg236's. We already had some code that buffered about 7.9k worth of logs before flushing to disk, so we shouldn't be spending too much time on IO.
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:34 AM.

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