java.lang.Object
org.apache.commons.net.examples.mail.Utils

class Utils extends Object
Utilities for mail examples
  • Constructor Summary

    Constructors
    Modifier
    Constructor
    Description
    private
     
  • Method Summary

    Modifier and Type
    Method
    Description
    (package private) static String
    getPassword(String username, 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.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • Utils

      private Utils()
  • Method Details

    • getPassword

      static String getPassword(String username, String password) throws 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:
      IOException