Here you can find the source of copyFileNormal(File copyFrom, File copyTo)
public static boolean copyFileNormal(File copyFrom, File copyTo) throws IOException
//package com.java2s; import java.io.BufferedInputStream; import java.io.BufferedOutputStream; import java.io.File; import java.io.FileInputStream; import java.io.FileOutputStream; import java.io.IOException; public class Main { public static boolean copyFileNormal(File copyFrom, File copyTo) throws IOException { if (!copyFrom.exists() || copyTo == null) { return false; }/*from ww w . ja v a2s . c o m*/ byte[] arrayOfByte = new byte[4096]; BufferedInputStream input = new BufferedInputStream(new FileInputStream(copyFrom)); BufferedOutputStream output = new BufferedOutputStream(new FileOutputStream(copyTo, false)); int i; while ((i = input.read(arrayOfByte, 0, arrayOfByte.length)) != -1) { output.write(arrayOfByte, 0, i); } output.close(); input.close(); return true; } }