View Single Post
  #5   Spotlight this post!  
Unread 25-01-2014, 19:06
JohnGilb JohnGilb is offline
Programming Mentor, Drive Mentor
FRC #0488
 
Join Date: Mar 2011
Rookie Year: 2003
Location: Redmond, WA
Posts: 116
JohnGilb has a spectacular aura aboutJohnGilb has a spectacular aura aboutJohnGilb has a spectacular aura about
Re: File IO without overwriting file

I've been getting IO exceptions whenever I try anything along the lines of

OutputStreamWriter writer = new OutputStreamWriter(connection.openOutputStream(Lon g.MAX_VALUE));


or index out of bounds exceptions when I try:

writer.write(entry, (int)connection.fileSize(), entry.length))

(notably, for a file with about 15 characters in it, fileSize is returning 4831838208. That doesn't seem healthy or right.)

Has anybody been able to append to a file successfully on the robot?
Reply With Quote