Java - wiping a .txt file?

Associate
Joined
1 Oct 2004
Posts
793
Location
Windsor
As part of a group project I've been given the task of making a collection reader which reads a given database of .txt files and outputs the results that I need to another .txt file for my friends component to read.

As part of this I would like to output the results to the same .txt file every time a new search is made, is there a way in java which would allow me to open and delete the contents of this file before writing the new content to it?

Cheers for your help.
 
Back
Top Bottom