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
How about below:
File temp = new File(""); if (temp.exists()) { RandomAccessFile raf = new RandomAccessFile(temp, "rw"); raf.setLength(0); }