deduplicator-indexer/src/main/java/is/landsbokasafn/deduplicator/indexer/CommandLineParser.java
/**
     * Print out optional message an optional usage and then exit.
     *
     * Private utility method.  JVM exits from inside in this method.
     *
     * @param message Message to print before we do usage.
     * @param doUsage True if we are to print out the usage message.
     * @param exitCode Exit code to use in call to System.exit.
     */
Print out optional message an optional usage and then exit.

Private utility method.  JVM exits from inside in this method.

@param message Message to print before we do usage.
@param doUsage True if we are to print out the usage message.
@param exitCode Exit code to use in call to System.exit.
Print out optional message an optional usage and then exit . Private utility method . JVM exits from inside in this method . @param message Message to print before we do usage . @param doUsage True if we are to print out the usage message . @param exitCode Exit code to use in call to System . exit .
private void outputAndExit(String message, boolean doUsage, int exitCode) {
        if (message !=  null) {
            this.out.println(message);
        }
        if (doUsage) {
            HelpFormatter formatter =
                new DigestHelpFormatter();
            formatter.printHelp(this.out, 80, NAME, "Options:", this.options,
                1, 2, "Arguments:", false);
            this.out.println(" source                     Data to iterate over (typically a directory containing");
            this.out.println("                            WARC files). If using a non-standard iterator, consult");
            this.out.println("                            relevant documentation");
            this.out.println(" target                     Target directory for index output. Directory need not");
            this.out.println("                            exist, but unless --add should be empty.");
        }
        this.out.close();
        System.exit(exitCode);
    }
private void outputAndExit ( String message , boolean doUsage , int exitCode ) { if ( message != null ) { this . out . println ( message ) ; } if ( doUsage ) { HelpFormatter formatter = new DigestHelpFormatter ( ) ; formatter . printHelp ( this . out , 80 , NAME , "Options:" , this . options , 1 , 2 , "Arguments:" , false ) ; this . out . println ( " source                     Data to iterate over (typically a directory containing" ) ; this . out . println ( "                            WARC files). If using a non-standard iterator, consult" ) ; this . out . println ( "                            relevant documentation" ) ; this . out . println ( " target                     Target directory for index output. Directory need not" ) ; this . out . println ( "                            exist, but unless --add should be empty." ) ; } this . out . close ( ) ; System . exit ( exitCode ) ; }
Print out optional message an optional usage and then exit.
Print out optional message an optional usage and then exit .
// Close printwriter so stream gets flushed.
