info.informatica.net
Class HostName

java.lang.Object
  extended by info.informatica.net.HostName
All Implemented Interfaces:
Serializable

public final class HostName
extends Object
implements Serializable

Encapsulates Hostname value and utility methods.

Version:
1.02
Author:
amengual at informatica dot info
See Also:
Serialized Form

Constructor Summary
HostName(String s)
           
 
Method Summary
static boolean checkValid(String s)
           
 String getFqdn()
           
static String getRootDomain(String fqdn)
           
static String getSubDomain(String fqdn)
          Gets the subdomain for this hostname.
static String getTopDomain(String fqdn)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HostName

public HostName(String s)
         throws HostNameException
Throws:
HostNameException
Method Detail

checkValid

public static boolean checkValid(String s)

getFqdn

public String getFqdn()

getTopDomain

public static String getTopDomain(String fqdn)

getRootDomain

public static String getRootDomain(String fqdn)
                            throws HostNameException
Throws:
HostNameException

getSubDomain

public static String getSubDomain(String fqdn)
                           throws HostNameException
Gets the subdomain for this hostname.

Parameters:
fqdn - A fully qualified domain name (FQDN).
Returns:
the subdomain of FQDN.
Throws:
HostNameException - if the hostname is invalid.