Package java.io

Examples of java.io.Console.readLine()


                    }

                    String attributeName = null;

                    while (attributeName == null || attributeName.length() == 0) {
                        attributeName = console.readLine("Enter Attribute Name:");
                    }
                    try {
                        vaultNISession.addSecuredAttributeWithDisplay(vaultBlock, attributeName, attributeValue);
                    } catch (Exception e) {
                        System.out.println("Exception occurred:" + e.getLocalizedMessage());
View Full Code Here


                    System.out.println("Task: Verify whether a secured attribute 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 (!vaultNISession.checkSecuredAttribute(vaultBlock, attributeName))
                            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

            System.err.println("No console.");
            System.exit(1);
        }

        while (encDir == null || encDir.length() == 0) {
            encDir = console
                    .readLine("Enter directory to store encrypted files:");
        }

        while (keystoreURL == null || keystoreURL.length() == 0) {
            keystoreURL = console.readLine("Enter Keystore URL:");
View Full Code Here

            encDir = console
                    .readLine("Enter directory to store encrypted files:");
        }

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

        char[] keystorePasswd = getSensitiveValue("Enter Keystore password");

        try {
View Full Code Here

        char[] keystorePasswd = getSensitiveValue("Enter Keystore password");

        try {
            while (salt == null || salt.length() != 8) {
                salt = console.readLine("Enter 8 character salt:");
            }

            String ic = console.readLine("Enter iteration count as a number (Eg: 44):");
            iterationCount = Integer.parseInt(ic);
            vaultNISession = new VaultSession(keystoreURL, new String(keystorePasswd), encDir, salt, iterationCount);
View Full Code Here

        try {
            while (salt == null || salt.length() != 8) {
                salt = console.readLine("Enter 8 character salt:");
            }

            String ic = console.readLine("Enter iteration count as a number (Eg: 44):");
            iterationCount = Integer.parseInt(ic);
            vaultNISession = new VaultSession(keystoreURL, new String(keystorePasswd), encDir, salt, iterationCount);

            while (keystoreAlias == null || keystoreAlias.length() == 0) {
                keystoreAlias = console.readLine("Enter Keystore Alias:");
View Full Code Here

            String ic = console.readLine("Enter iteration count as a number (Eg: 44):");
            iterationCount = Integer.parseInt(ic);
            vaultNISession = new VaultSession(keystoreURL, new String(keystorePasswd), encDir, salt, iterationCount);

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

            System.out.println("Initializing Vault");
            vaultNISession.startVaultSession(keystoreAlias);
            vaultNISession.vaultConfigurationDisplay();
View Full Code Here

        catch(Exception e) {
        }

        if (must_auth) {
            if (cons != null) {
                username = cons.readLine("Management username: ");
                password = String.valueOf(cons.readPassword("Management password: "));
            }
        }
        SosInterpreter interpreter = new SosInterpreter();
        return interpreter.collect(username, password, host, port);
View Full Code Here

  public static void main(String[] args) {

    Console console = System.console();
    //read user name, using java.util.Formatter syntax :
    if (vcap_email == null) {
      vcap_email = console.readLine("Login E-Mail? ");
        }
    //read the password, without echoing the output
    if (vcap_passwd == null) {
      vcap_passwd = new String(console.readPassword("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.