• Post Reply Bookmark Topic Watch Topic
  • New Topic

Writing to the end of a file

 
Greg Reeder
Ranch Hand
Posts: 99
Eclipse IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 3166
34
Google App Engine Java Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Greg Reeder
Ranch Hand
Posts: 99
Eclipse IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you! That little 'true' was all I needed. Thanks.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!