private File readParamFileIn(CliArguments arguments) {
   if (arguments.argumentCount() > 0) {
     // first argument is in-file
     return new File(arguments.argument(0));
   }
   return null; // no in-file
 }
 private Format readOptionFormat(CliArguments arguments) {
   Format format = Format.AUTO;
   if (arguments.hasOption("format")) {
     format = Format.valueOf(arguments.option("format").toUpperCase());
   }
   return format;
 }
 private String readOptionComment(CliArguments arguments) {
   if (arguments.hasOption("comment")) {
     return arguments.option("comment");
   }
   return null;
 }
 private Charset readOptionEncoding(CliArguments arguments) {
   if (arguments.hasOption("encoding")) {
     return Charset.forName(arguments.option("encoding"));
   }
   return null;
 }
 private static boolean wantsHelp(CliArguments args) {
   return args.optionCount() == 1 && args.hasOption("h");
 }
 private File readOptionFileOut(CliArguments arguments) {
   if (arguments.hasOption("out")) {
     return new File(arguments.option("out"));
   }
   return null; // no out-file
 }