| java.lang.Object org.apache.harmony.tools.keytool.ArgumentsParser
ArgumentsParser | class ArgumentsParser (Code) | | The class to interact with the user - parse the program arguments, ask for
confirmations, and necessary parameters which haven't been set in the command
line.
|
Method Summary | |
static void | getAdditionalParameters(KeytoolParameters param) Checks if the needed values are set and, if not, prompts for them. | static boolean | getConfirmation(String promt, boolean acceptAnother) Prints a promt. | static KeytoolParameters | parseArgs(String[] args) The method finds known options in args which is usually taken from
command line and sets the corresponding fields of the returned
KeytoolParameters object to given values.
Parameters: args - -String array to parse. |
charsRead | static int charsRead(Code) | | |
maxNrOfAttempts | static int maxNrOfAttempts(Code) | | |
minPwdLength | static int minPwdLength(Code) | | |
readData | static char[] readData(Code) | | |
getConfirmation | static boolean getConfirmation(String promt, boolean acceptAnother) throws IOException, KeytoolException(Code) | | Prints a promt. Reads what the user enters. If the user has entered
'y'/"yes" or 'n'/"no" (case insensitively) the method returns
respectively true or false. Depending on acceptAnother parameter the
method can return false if anything except 'y' or "yes" is entered, or it
can prompt for a correct answer. If only ENTER is pressed false is
returned.
Parameters: promt - -text printed to ask the user for a confirmation Parameters: acceptAnother - -if set to true, the method returns true if and only if theuser enters 'y' or "yes"; if set to false prompts to reenterthe answer from user until 'y'/"yes" or 'n'/"no" is entered. true if the user confirms the request, false - otherwise. throws: IOException - |
|
|