use of net.sourceforge.processdash.util.RobustFileWriter in project processdash by dtuma.
the class ChangeHistory method write.
public void write(File f) throws IOException {
// if we were given a directory, write to the change history file there
if (f.isDirectory())
f = new File(f, WBSFilenameConstants.CHANGE_HISTORY_FILE);
// write the XML to the file
BufferedWriter out = new BufferedWriter(new RobustFileWriter(f, "utf-8"));
getAsXML(out);
out.flush();
out.close();
}
use of net.sourceforge.processdash.util.RobustFileWriter in project processdash by dtuma.
the class MigrationToolTeam method migrateDatafileContents.
private void migrateDatafileContents(File dataFile) throws IOException {
StringBuffer contents = slurpFile(dataFile);
StringUtils.findAndReplace(contents, "/team_root_dataFile.txt>", "/team2_root_dataFile.txt>");
String newline = System.getProperty("line.separator");
contents.append(newline).append("Team_Project_Migration_Complete==1").append(newline);
Writer out = new BufferedWriter(new RobustFileWriter(dataFile));
out.write(contents.toString());
out.close();
}
Aggregations