Fast file copy and move by java

The following method does very fast file copy from one location to another location.

public boolean copyTo(File source, File destination) {
	try {
		FileInputStream fis = new FileInputStream(source);
		FileOutputStream fos = new FileOutputStream(destination);

		byte []buf = new byte[4096];
		int loaded = 0;
		while ((loaded = fis.read(buf)) > 0 ) {
			fos.write(buf, 0, loaded);
		}
		fis.close();
		fos.close();
	} catch (IOException e) {
		e.printStackTrace();
		return false;
	}
	return true;
}

Here i used 4096 byte buffer thats the key for fast copy.this value is optimize value from from different tested values.

The following method does very fast file move from one location to another location.

public boolean moveTo(File source, File destination) {
	boolean isRenamed;
	if(isPathExists(destination.getAbsolutePath())){
		destination.delete();
	}

	isRenamed = source.renameTo(destination);
	if(!isRenamed){
		copyTo(source,destination);
		source.delete();
	}
	return isRenamed;

}

public boolean isPathExists(String path){
	File location = new File(path);
	return location.exists();
}

The key of fast moving is the rename function.