org.apache.james.jspf.core
Class Inet6Util

java.lang.Object
  extended by org.apache.james.jspf.core.Inet6Util

public class Inet6Util
extends java.lang.Object

Utility functions for IPV6 operations. see Inet6Util from the Apache Harmony project see org.apache.harmony.util.Inet6Util


Method Summary
static void convertToBytes(java.lang.String hexWord, byte[] ipByteArray, int byteIndex)
          Converts a 4 character hex word into a 2 byte word equivalent
static byte[] createByteArrayFromIPAddressString(java.lang.String ipAddressString)
          Creates an byte[] based on an ipAddressString.
static boolean isValidIP4Word(java.lang.String word)
           
static boolean isValidIP6Address(java.lang.String ipAddress)
           
static boolean isValidIPV4Address(java.lang.String value)
          Takes a string and parses it to see if it is a valid IPV4 address.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

createByteArrayFromIPAddressString

public static byte[] createByteArrayFromIPAddressString(java.lang.String ipAddressString)
Creates an byte[] based on an ipAddressString. No error handling is performed here.


convertToBytes

public static void convertToBytes(java.lang.String hexWord,
                                  byte[] ipByteArray,
                                  int byteIndex)
Converts a 4 character hex word into a 2 byte word equivalent


isValidIP6Address

public static boolean isValidIP6Address(java.lang.String ipAddress)

isValidIP4Word

public static boolean isValidIP4Word(java.lang.String word)

isValidIPV4Address

public static boolean isValidIPV4Address(java.lang.String value)
Takes a string and parses it to see if it is a valid IPV4 address.

Returns:
true, if the string represents an IPV4 address in dotted notation, false otherwise


Copyright © 2006-2009 The Apache Software Foundation. All Rights Reserved.