All Packages Class Hierarchy This Package Previous Next Index
Class cryptix.util.EmailAddress
java.lang.Object
|
+----cryptix.util.EmailAddress
- public final class EmailAddress
- extends Object
Represents an Internet e-mail address - username and host can be retrieved
separately.
This may seem rather banal.
It's useful for three reasons, however:
- To fetch a user's public key from a distributed keyserver system, you
need to know the hostname - this class saves duplication of effort.
- It allows KeyRing.getKey() to be overloaded rather than having a
separate getKeyByAddress().
- 'Friendly' e-mail addresses of the form
"Friendly Name <dfh343@host.domain>"
are automatically dealt with.
Copyright © 1995-1997
Systemics Ltd on behalf of the
Cryptix Development Team.
All rights reserved.
$Revision: 1.3 $
- Author:
- Ian Brown
-
EmailAddress(String)
- Constructs an EmailAddress from the given friendly address.
-
equals(Object)
-
-
hashCode()
-
-
host()
- Gets the host name/domain for this address (i.e.
-
hostPath()
- Gets a Vector containing each dot-separated component of the host name.
-
main(String[])
-
-
self_test(PrintWriter)
-
-
toString()
-
-
user()
- Gets the username for this address (i.e.
EmailAddress
public EmailAddress(String friendlyAddress) throws IOException
- Constructs an EmailAddress from the given friendly address.
- Throws: IOException
- if the address is not valid.
toString
public String toString()
- Overrides:
- toString in class Object
user
public String user()
- Gets the username for this address (i.e. the portion before the "@"
symbol).
host
public String host()
- Gets the host name/domain for this address (i.e. the portion after
the "@" symbol).
hostPath
public Vector hostPath()
- Gets a Vector containing each dot-separated component of the host name.
This is useful for clients of distributed keyservers who need to query
each possible keyserver in turn.
equals
public boolean equals(Object obj)
- Overrides:
- equals in class Object
hashCode
public int hashCode()
- Overrides:
- hashCode in class Object
main
public static void main(String args[])
self_test
public static void self_test(PrintWriter out) throws IOException
All Packages Class Hierarchy This Package Previous Next Index