Main program @param args
(String[] args)
| 127 | * @param args |
| 128 | */ |
| 129 | public static void main(String[] args) { |
| 130 | LOG.info("-- START --"); |
| 131 | if (args.length < 2) { |
| 132 | LOG.error("No input or output file"); |
| 133 | System.exit(-1); |
| 134 | } |
| 135 | |
| 136 | DcatReader reader = null; |
| 137 | try { |
| 138 | reader = new DcatReader(Paths.get(args[0])); |
| 139 | } catch (IOException ioe) { |
| 140 | LOG.error("Could not read {}: {} ", args[0], ioe.getMessage()); |
| 141 | System.exit(-2); |
| 142 | } |
| 143 | |
| 144 | ICSVWriter writer = null; |
| 145 | try { |
| 146 | writer = new CSVWriterBuilder(Files.newBufferedWriter(Paths.get(args[1]))) |
| 147 | .withSeparator(';').withQuoteChar('"').build(); |
| 148 | createReport(reader, writer); |
| 149 | } catch (IOException ioe) { |
| 150 | LOG.error("Could not write to {} : {}", args[1], ioe.getMessage()); |
| 151 | System.exit(-3); |
| 152 | } |
| 153 | } |
| 154 | } |
nothing calls this directly
no test coverage detected