title: FileChannel.transferFrom to shift file content
body: <p>I tried to use FileChannel.transferFrom to move some content of a file to the begining.</p>
  
  <pre><code>try (RandomAccessFile rafNew = new RandomAccessFile(_fileName, "rw");
          RandomAccessFile rafOld = new RandomAccessFile(_fileName, "r");) 
  {
          rafOld.seek(pos);
          rafOld.getChannel().transferTo(0, count, rafNew.getChannel());
  } catch (IOException e) {
          throw new RuntimeException(e.getMessage());
  }
  </code></pre>
  
  <p>The result of this is a file with strange repetitions of data. The example works if I first transfer data to a buffer file and then from buffer file back to the origin file again. </p>
  
  <p>The Java Docs say nothing about the case where source and destination are the same file.</p>