title: how to delete the content of text file without deleting itself
body: <p>I want to copy the content of file 'A' to file 'B'.
  after the copying is done I want to clear the content of file 'A' and want to write on it from its beginning.
  I can't delete file 'A' as it is related to some other task.</p>
  
  <p>I was able to copy the content using java's file API(readLine() ), but don't know how to clear the content of file and set the file pointer to the beginning of the file.</p>