232233234235236237238239
FileUtils.deleteQuietly(destFile); throw new IOException("Failed to delete original file '" + srcFile + "' after copy to '" + destFile + "'"); } } } catch (Exception e) { throw new DCFileException(e); } }
246247248249250251252253254
public static List<String> readLines(File file) { List<String> lines = new ArrayList<String>(); try { lines = FileUtils.readLines(file, "utf-8"); } catch (Exception ex) { throw new DCFileException(ex); } return lines; }