public static void main(String[] args) {
        try {
            Logger.getLogger("").setLevel(Level.WARNING);
            CommandLineOptions options = new CommandLineOptions();
            ClientParameters params = options.parseCommandLineArguments(args);

            if (params.help) {
                options.printHelp();
            } else {
                DocumentRetriever documentRetriever = createDocumentRetriever(params);
                addShutdownHook(documentRetriever);
                documentRetriever.retrieveDocuments();
            }
        } catch (IllegalArgumentException e) {
            System.err.printf("Failed to parse command line arguments: %s.\n", e.getMessage());
        } catch (DocumentRetrieverException e) {
            System.err.printf("Failed to retrieve documents: %s\n", e.getMessage());
        }
    }
The vespa-get tool retrieves documents from a Vespa Document Storage cluster, and prints them to stdout as XML.

@author bjorncs
vespaclient-java/src/main/java/com/yahoo/vespaget/Main.java