| Author |
Writing to the end of a file
|
Greg Reeder
Ranch Hand
Joined: Jun 14, 2011
Posts: 99
|
|
Hello everyone and merry Christmas ( {eve day} depending on time zones etc)
I have a general quesiton. I am trying to design a logger class, and I want to close a log, and then reopen it later for the next issue, and [here is the key and the reason I am writing this today] write a brief description of the exception at the very end of the file. The question is, what class must I use in order to write the new lines at the very end of the existing file without going through the hassle of creating a tmp file, re-writing, et cetera, et cetera, et cetera?
Thanks in advance,
Greg
|
 |
Mohamed Sanaulla
Bartender
Joined: Sep 08, 2007
Posts: 2693
|
|
I found a useful related post for you.
But the idea is to use one of the java.io.Writer implementation and then use its append method.
|
Mohamed Sanaulla | My Blog
|
 |
Greg Reeder
Ranch Hand
Joined: Jun 14, 2011
Posts: 99
|
|
|
Thank you! That little 'true' was all I needed. Thanks.
|
 |
 |
|
|
subject: Writing to the end of a file
|
|
|