code: public static void main(String[] args) throws IOException {
      Options options = buildOptions();
      if (args.length == 0) {
        printUsage();
        return;
      }
  
      CommandLineParser parser = new PosixParser();
      CommandLine cmd;
  
      try {
        cmd = parser.parse(options, args);
      } catch (ParseException e) {
        System.out.println("Error parsing command-line options: ");
        printUsage();
        return;
      }
  
      if (cmd.hasOption("h")) { // print help and exit
        printUsage();
        return;
      }
  
      String inputFile = cmd.getOptionValue("i");
      String outputFile = cmd.getOptionValue("o");
  
      try {
        OfflineImageDecompressor d = new OfflineImageDecompressor(inputFile,
            outputFile);
        d.go();
      } catch (EOFException e) {
        System.err.println("Input file ended unexpectedly.  Exiting");
        System.exit(255);
      } catch (IOException e) {
        System.err.println("Encountered exception.  Exiting: " + e.getMessage());
        System.exit(1);
      }
    }
docs: Entry point to command-line-driven operation. User may specify options and
  start fsimage viewer from the command line. Program will process image file
  and exit cleanly or, if an error is encountered, inform user and exit.
  
  @param args
  Command line options
  @throws IOException