Class Utils
- java.lang.Object
-
- org.apache.commons.net.examples.mail.Utils
-
class Utils extends java.lang.Object
Utilities for mail examples
-
-
Constructor Summary
Constructors Modifier Constructor Description private
Utils()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description (package private) static java.lang.String
getPassword(java.lang.String username, java.lang.String password)
If the initial password is: '*' - replace it with a line read from the system console '-' - replace it with next line from STDIN 'ABCD' - if the input is all upper case, use the field as an environment variable name Note: there are no guarantees that the password cannot be snooped.
-
-
-
Method Detail
-
getPassword
static java.lang.String getPassword(java.lang.String username, java.lang.String password) throws java.io.IOException
If the initial password is: '*' - replace it with a line read from the system console '-' - replace it with next line from STDIN 'ABCD' - if the input is all upper case, use the field as an environment variable name Note: there are no guarantees that the password cannot be snooped. Even using the console may be subject to memory snooping, however it should be safer than the other methods. STDIN may require creating a temporary file which could be read by others Environment variables may be visible by using PS- Throws:
java.io.IOException
-
-