cryptix.util
Class EmailAddress

java.lang.Object
  |
  +--cryptix.util.EmailAddress

public final class EmailAddress
extends java.lang.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:

Copyright © 1995-1997 Systemics Ltd on behalf of the Cryptix Development Team.
All rights reserved.

$Revision: 1.4 $

Since:
Cryptix 2.2
Author:
Ian Brown

Constructor Summary
EmailAddress(java.lang.String friendlyAddress)
          Constructs an EmailAddress from the given friendly address.
 
Method Summary
 boolean equals(java.lang.Object obj)
           
 int hashCode()
           
 java.lang.String host()
          Gets the host name/domain for this address (i.e. the portion after the "@" symbol).
 java.util.Vector hostPath()
          Gets a Vector containing each dot-separated component of the host name.
static void main(java.lang.String[] args)
           
static void self_test(java.io.PrintWriter out)
           
 java.lang.String toString()
           
 java.lang.String user()
          Gets the username for this address (i.e. the portion before the "@" symbol).
 
Methods inherited from class java.lang.Object
, clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

EmailAddress

public EmailAddress(java.lang.String friendlyAddress)
             throws java.io.IOException
Constructs an EmailAddress from the given friendly address.
Throws:
java.io.IOException - if the address is not valid.
Method Detail

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

user

public java.lang.String user()
Gets the username for this address (i.e. the portion before the "@" symbol).

host

public java.lang.String host()
Gets the host name/domain for this address (i.e. the portion after the "@" symbol).

hostPath

public java.util.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(java.lang.Object obj)
Overrides:
equals in class java.lang.Object

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object

main

public static void main(java.lang.String[] args)

self_test

public static void self_test(java.io.PrintWriter out)
                      throws java.io.IOException