org.archive.util
Class InetAddressUtil

java.lang.Object
  extended by org.archive.util.InetAddressUtil

public class InetAddressUtil
extends java.lang.Object

InetAddress utility.

Version:
$Date: 2009-08-27 23:45:31 +0000 (Thu, 27 Aug 2009) $, $Revision: 6477 $
Author:
stack

Field Summary
static java.util.regex.Pattern IPV4_QUADS
          ipv4 address.
 
Method Summary
static java.util.List<java.lang.String> getAllLocalHostNames()
           
static java.net.InetAddress getIPHostAddress(java.lang.String host)
          Returns InetAddress for passed host IF its in IPV4 quads format (e.g.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

IPV4_QUADS

public static java.util.regex.Pattern IPV4_QUADS
ipv4 address.

Method Detail

getIPHostAddress

public static java.net.InetAddress getIPHostAddress(java.lang.String host)
Returns InetAddress for passed host IF its in IPV4 quads format (e.g. 128.128.128.128).

TODO: Move to an AddressParsingUtil class.

Parameters:
host - Host name to examine.
Returns:
InetAddress IF the passed name was an IP address, else null.

getAllLocalHostNames

public static java.util.List<java.lang.String> getAllLocalHostNames()
Returns:
All known local names for this host or null if none found.


Copyright © 2003-2011 Internet Archive. All Rights Reserved.