How to read and copy contents from one file into another (Java)

This programs copies all contents of file myfile.txt into a new file file.txt.

import java.io.DataOutputStream;
import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.IOException;
/**
* E:\core\io\NB\file.txt
* @author Sudhanshu
*/
public class ReadWrite {

/**
* @param args the command line arguments
*/
public static void main(String[] args) throws IOException {
FileOutputStream fos;
DataOutputStream dos;
FileInputStream fis = new FileInputStream(“E://core//io//NB//myfile.txt”);
byte[] b=new byte[fis.available()];
fis.read(b);
fos = new FileOutputStream(“E://core//io//NB//file.txt”);
dos = new DataOutputStream(fos);
dos.write(b);

dos.close();
fos.close();
}
}