IOException
{
Report report;
if (listChecks)
{
report = new DefaultReportImpl("none");
}
else if (jsonOutput)
{
report = new CheckingReport(path, (fileOut==null)?null:fileOut.getPath());
}
else if (xmlOutput)
{
PrintWriter pw = null;
if (fileOut == null) {
pw = new PrintWriter(System.out, true);
} else {
pw = new PrintWriter(fileOut, "UTF-8");
}
report = new XmlReportImpl(pw, path, EpubCheck.version());
}
else if (xmpOutput)
{
PrintWriter pw = null;
if (fileOut == null) {
pw = new PrintWriter(System.out, true);
} else {
pw = new PrintWriter(fileOut, "UTF-8");
}
report = new XmpReportImpl(pw, path, EpubCheck.version());
}
else
{
report = new DefaultReportImpl(path);
}
report.setReportingLevel(this.reportingLevel);
if (useCustomMessageFile)
{
report.setOverrideFile(customMessageFile);