FileDocCategorySizeDatePackage
InetAddressUtils.javaAPI DocAndroid 1.5 API2714Wed May 06 22:41:10 BST 2009org.apache.http.conn.util

InetAddressUtils

public class InetAddressUtils extends Object
A collection of utilities relating to InetAddresses.

Fields Summary
private static final Pattern
IPV4_PATTERN
private static final Pattern
IPV6_STD_PATTERN
private static final Pattern
IPV6_HEX_COMPRESSED_PATTERN
Constructors Summary
private InetAddressUtils()

    
Methods Summary
public static booleanisIPv4Address(java.lang.String input)


          
        return IPV4_PATTERN.matcher(input).matches();
    
public static booleanisIPv6Address(java.lang.String input)

        return isIPv6StdAddress(input) || isIPv6HexCompressedAddress(input); 
    
public static booleanisIPv6HexCompressedAddress(java.lang.String input)

        return IPV6_HEX_COMPRESSED_PATTERN.matcher(input).matches();
    
public static booleanisIPv6StdAddress(java.lang.String input)

        return IPV6_STD_PATTERN.matcher(input).matches();