use of com.evolveum.midpoint.cli.ninja.util.LogWriter in project midpoint by Evolveum.
the class ExportAction method createWriter.
private Writer createWriter() throws IOException {
File file = getParams().getFile();
if (file != null) {
if (file.exists()) {
file.delete();
}
file.createNewFile();
OutputStream os = new FileOutputStream(file);
if (getParams().isZip()) {
os = new ZipOutputStream(os);
}
Writer writer = new OutputStreamWriter(os, StandardCharsets.UTF_8);
return new BufferedWriter(writer);
}
return new LogWriter(STD_OUT);
}
Aggregations