Results 1 to 2 of 2
Thread: writing to a file
- 11-10-2007, 08:29 PM #1
Senior Member
- Join Date
- Nov 2007
- Posts
- 111
- Rep Power
- 0
writing to a file
I am randomly accessing a file and want to append text at the end of the file. I am trying following code.
I get exception at following like:Java Code:File file = new File("C:\\myFile.txt"); RandomAccessFile raf = new RandomAccessFile(file, "rw"); raf.seek(file.length()); raf.write("MyMessage");
saying:Java Code:raf.write("MyMessage");
Any clues??Java Code:The method write(int) in the type RandomAccessFile is not applicable for the arguments (String)
- 11-11-2007, 02:49 AM #2
Similar Threads
-
writing to a excel file from java program
By priyankabhar in forum New To JavaReplies: 6Last Post: 03-15-2012, 04:29 PM -
writing and reading unicode characters from a file
By ranoosh in forum Advanced JavaReplies: 4Last Post: 09-28-2008, 04:34 AM -
Writing to a file (at the end)
By Java Tip in forum Java TipReplies: 0Last Post: 02-08-2008, 09:22 AM -
Writing UTF to file using writeUTF
By Java Tip in forum Java TipReplies: 0Last Post: 01-22-2008, 08:19 PM -
Help with File reading and writing
By baltimore in forum New To JavaReplies: 1Last Post: 07-31-2007, 06:47 PM


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks