use of net.sourceforge.processdash.util.RobustFileOutputStream in project processdash by dtuma.
the class FilePersistenceService method save.
public OutputStream save(String qualifier, String filename) throws IOException {
if (Settings.isReadOnly())
return null;
// see if our qualifier matches the specified qualifier.
if (this.qualifier != null && !this.qualifier.equalsIgnoreCase(qualifier))
return null;
// abort.
if (!baseDirectory.isDirectory() && !baseDirectory.mkdirs())
return null;
File f = getFile(filename);
RobustFileOutputStream out = new RobustFileOutputStream(f);
return out;
}
use of net.sourceforge.processdash.util.RobustFileOutputStream in project processdash by dtuma.
the class MigrationToolIndiv method writeHierarchyFile.
private void writeHierarchyFile() throws IOException {
BufferedWriter out = new BufferedWriter(new OutputStreamWriter(new RobustFileOutputStream(file("state")), "UTF-8"));
out.write(XMLUtils.getAsText(hier));
out.close();
}
Aggregations