示例#1
0
 private Format readOptionFormat(CliArguments arguments) {
   Format format = Format.AUTO;
   if (arguments.hasOption("format")) {
     format = Format.valueOf(arguments.option("format").toUpperCase());
   }
   return format;
 }
示例#2
0
 private Charset readOptionEncoding(CliArguments arguments) {
   if (arguments.hasOption("encoding")) {
     return Charset.forName(arguments.option("encoding"));
   }
   return null;
 }
示例#3
0
 private String readOptionComment(CliArguments arguments) {
   if (arguments.hasOption("comment")) {
     return arguments.option("comment");
   }
   return null;
 }
示例#4
0
 private File readOptionFileOut(CliArguments arguments) {
   if (arguments.hasOption("out")) {
     return new File(arguments.option("out"));
   }
   return null; // no out-file
 }