Package java.io

Examples of java.io.Console.readLine()


        } catch (Exception e) {
            System.out.println("Exception encountered:" + e.getLocalizedMessage());
        }

        while (keystoreAlias == null || keystoreAlias.length() == 0) {
            keystoreAlias = console.readLine("Enter Keystore Alias:");
        }

        try {
            vault = SecurityVaultFactory.get();
            System.out.println("Obtained Vault");
View Full Code Here


                    System.out.println("Task:  Store a password");
                    char[] attributeValue = VaultInteractiveSession.getSensitiveValue("Please enter attribute value");
                    String vaultBlock = null;

                    while (vaultBlock == null || vaultBlock.length() == 0) {
                        vaultBlock = console.readLine("Enter Vault Block:");
                    }

                    String attributeName = null;

                    while (attributeName == null || attributeName.length() == 0) {
View Full Code Here

                    }

                    String attributeName = null;

                    while (attributeName == null || attributeName.length() == 0) {
                        attributeName = console.readLine("Enter Attribute Name:");
                    }
                    try {
                        vault.store(vaultBlock, attributeName, attributeValue, handshakeKey);

                        String keyAsString = new String(handshakeKey);
View Full Code Here

                    System.out.println("Task: Verify whether a password exists");
                    try {
                        vaultBlock = null;

                        while (vaultBlock == null || vaultBlock.length() == 0) {
                            vaultBlock = console.readLine("Enter Vault Block:");
                        }

                        attributeName = null;

                        while (attributeName == null || attributeName.length() == 0) {
View Full Code Here

                        }

                        attributeName = null;

                        while (attributeName == null || attributeName.length() == 0) {
                            attributeName = console.readLine("Enter Attribute Name:");
                        }
                        if (vault.exists(vaultBlock, attributeName) == false)
                            System.out.println("No value has been store for (" + vaultBlock + ", " + attributeName + ")");
                        else
                            System.out.println("A value exists for (" + vaultBlock + ", " + attributeName + ")");
View Full Code Here

        Console console = System.console();
        while (true) {
            System.out.println("1. encode values");
            System.out.println("2. decode values");
            System.out.println("3. exit");
            String choice = console.readLine();
            if ("1".equals(choice)) {
                String text = console.readLine("Text: ");
                System.out.println(valueCoder.encode(text));
            } else if ("2".equals(choice)) {
                String text = console.readLine("Text: ");
View Full Code Here

            System.out.println("1. encode values");
            System.out.println("2. decode values");
            System.out.println("3. exit");
            String choice = console.readLine();
            if ("1".equals(choice)) {
                String text = console.readLine("Text: ");
                System.out.println(valueCoder.encode(text));
            } else if ("2".equals(choice)) {
                String text = console.readLine("Text: ");
                System.out.println(valueCoder.decode(text));
            } if ("3".equals(choice)) {
View Full Code Here

            String choice = console.readLine();
            if ("1".equals(choice)) {
                String text = console.readLine("Text: ");
                System.out.println(valueCoder.encode(text));
            } else if ("2".equals(choice)) {
                String text = console.readLine("Text: ");
                System.out.println(valueCoder.decode(text));
            } if ("3".equals(choice)) {
                return;
            }
        }
View Full Code Here

            return true;
        }
       
        cons.printf("%s%n", c.toString());
        String result =
            cons.readLine("%s", strmgr.get("certificateTrustPrompt"));
        return result != null && result.equalsIgnoreCase("y");
    }
    private String getAliasName() {
        String aliasName = _alias != null ? _alias.toString() : "";
View Full Code Here

        String password;
        MobClient cli;

        try {
            Console console = System.console();
            username = console.readLine("username: ");
            password = new String(console.readPassword("password: "));

            System.out.println("> Connessione al server in corso, attendere...");
            cli = authServer.login(username, password);
        }
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.