copy and paste the file in swt
<p>I am having a zip file in my E:\temp\file.zip. Now I need to copy the whole zip file and paste it to my desktop and the original zip file should not be deleted. This should be done using java SWT lib.</p>

<pre><code>import java.io.*;
import javax.swing.*; 

public class MovingFile { 
  public static void copyStreamToFile() throws IOException { 
    FileOutputStream foutOutput = null; 
    String oldDir = "F:/CAF_UPLOAD_04052011.TXT.zip"; 
    System.out.println(oldDir); 
    String newDir = "F:/New/CAF_UPLOAD_04052011.TXT.zip.zip"; 
    // name the file in destination File f = new File(oldDir); 
    f.renameTo(new File(newDir)); 
} 

  public static void main(String[] args) throws IOException { 
    copyStreamToFile(); 
  } 
}
</code></pre>
