|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectde.fhg.igd.util.Password
public class Password
Reads in passwords from the command line. This class attempts to disable character echoing for the input. Windows NT DOS shells do not support ANSI terminal codes. Conceiling password input is not supported on this OS. UNIX'es should have no problems with that.
Passwords are read by means of the System.in standard input stream.
| Field Summary | |
|---|---|
static int |
MAX_LEN
The maximum length supported for passwords. |
| Constructor Summary | |
|---|---|
Password()
|
|
| Method Summary | |
|---|---|
static boolean |
canConceal()
Returns false if password input cannot be
conceiled. |
static void |
clear(char[] c)
Clears the given character array by filling it with zeroes. |
static char[] |
read(String message)
Reads in a password and returns it as a character array. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final int MAX_LEN
| Constructor Detail |
|---|
public Password()
| Method Detail |
|---|
public static boolean canConceal()
false if password input cannot be
conceiled. This method checks the system property
"os.name". If the value of this property
is "Windows NT" then false
is returned and true otherwise.
false if password input cannot be
conceiled and true if conceiling is
probably possible.public static char[] read(String message)
message - The message printed before the password
prompt.
public static void clear(char[] c)
c - The character array holding a password.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||