예제 #1
0
 public static void main(String args[]) throws IOException {
   Args arguments = new Args(args);
   TimeZone timeZone = parseTimeZoneConfig(arguments);
   try (Printer printer = getPrinter(arguments)) {
     for (String fileAsString : arguments.orphans()) {
       new DumpLogicalLog(new DefaultFileSystemAbstraction())
           .dump(fileAsString, printer.getFor(fileAsString), timeZone);
     }
   }
 }
예제 #2
0
 private String determineStoreDirectory(Args arguments) throws ToolFailureException {
   List<String> unprefixedArguments = arguments.orphans();
   if (unprefixedArguments.size() != 1) {
     throw new ToolFailureException(usage());
   }
   String storeDir = unprefixedArguments.get(0);
   if (!new File(storeDir).isDirectory()) {
     throw new ToolFailureException(
         lines(String.format("'%s' is not a directory", storeDir)) + usage());
   }
   return storeDir;
 }