public static void copyFile(File from, File into) { if (!from.exists()) return; if (from.getPath().equals(into.getPath())) return; from.setReadable(true); if (into.exists()) into.delete(); try { StreamUtil.writeBuffer(into, new FileInputStream(from), true); } catch (IOException e) { e.printStackTrace(); } }