java.net
Class PasswordAuthentication

java.lang.Object
  extended by java.net.PasswordAuthentication

public final class PasswordAuthentication
extends Object

This class serves a container for username/password pairs.

Since:
1.2

Constructor Summary
PasswordAuthentication(String username, char[] password)
          Creates a new PasswordAuthentication object from the specified username and password.
 
Method Summary
 char[] getPassword()
          Returns the password associated with this object
 String getUserName()
          Returns the username associated with this object
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PasswordAuthentication

public PasswordAuthentication(String username,
                              char[] password)
Creates a new PasswordAuthentication object from the specified username and password.

Parameters:
username - The username for this object
password - The password for this object
Method Detail

getUserName

public String getUserName()
Returns the username associated with this object

Returns:
The username

getPassword

public char[] getPassword()
Returns the password associated with this object

Returns:
The password