Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

howto continue write file

 
Alvin chew
Ranch Hand
Posts: 834
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi, i have following code which function as file writer, my problem is how to i continue write the file which is already exist ?




[ October 08, 2004: Message edited by: Alvin chew ]
 
Steve Deadsea
Ranch Hand
Posts: 125
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Use the append parameter to the FileWriter constructor:
new FileWriter(path + "\\"+ navbarindex, true)
 
Alvin chew
Ranch Hand
Posts: 834
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i have few html layout which i will use different methods to generate different code for each of the layout, as show above, i use one of the method generate layout code which is navBarLayout1() and then pass the code to navBarContentGen(String content) method to write the file, but my problem is, it only write the last case which is case 3 in my switch case ..and it support print all cases's string to file

what i suspect is may be because of file close and open problem ..is there anyone have idea on it ? thank you very much for viewing and answering !!
[ October 08, 2004: Message edited by: Alvin chew ]
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic