title: tempfile gives wrong absolutepath after renameto
body: <p>I'm changing contents of a file, therefore I read a file line by line, replace what I want and write line by line to a tempfiles. When the whole file is processed, I delete the original file, and rename the tempfile to the original filename.
  like this</p>
  
  <pre><code>File orginialFile = new File("C:\\java\\workspace\\original.xml");
  File tempFile = File.createTempFile("tempfile", ".tmp", new File(C:\\java\\workspace\\"));
  while ((str_String = reader.readLine()) != null) {
  //read lines and replace and write lines
  }
  orginialFile .delete();     
  tempFile.renameTo(new File("C:\\java\\workspace\\original.xml"));
  </code></pre>
  
  <p>After this is done, I request the absolutepath (tempFile.getAbsolutePath();) of the temp file. But this gives me
  c:\java\workspace\tempfile3729727953777802965.tmp (the number changes every run of the program) in stead of c:\java\workspace\original.xml</p>
  
  <p>How come? </p>
  
  <p>I debugged it and just before the moment that I request the absolutepath, I checked in c:\java\workspace (windows explorer) and there is no tempfile. Only original file.</p>
  
  <p>So the process runs correctly, I just wanted to know why it is not showing the renamed absolutepath. (I would use it for logging)</p>
  
  <p>Thx</p>