|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.ujac.util.console.PasswordReader
public class PasswordReader
Name: PasswordReader
Description: Reads a password from console input and tries to hide the typed characters.
Constructor Summary | |
---|---|
PasswordReader(String prompt)
Constructs a PasswordReader with no specific attributes. |
Method Summary | |
---|---|
static void |
main(String[] args)
The main method for testing purposes. |
String |
readPassword()
Reads the password from the command line. |
void |
run()
Begins masking until asked to stop. |
void |
stopMasking()
Instructs the thread to stop masking. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public PasswordReader(String prompt)
prompt
- The command line prompt.Method Detail |
---|
public void run()
run
in interface Runnable
public void stopMasking()
public String readPassword() throws IOException
IOException
- In case the console input failed.public static void main(String[] args)
args
- The command line arguments.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |