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.
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.