| org.apache.lenya.net.InetAddressUtil
InetAddressUtil | public class InetAddressUtil extends AbstractLogEnabled (Code) | | A utility class for InetAddress. Also see http://jodies.de/ipcalc
|
Method Summary | |
public int | checkNetmask(InetAddress netmask) Check netmask, e.g. | public boolean | contains(InetAddress network, InetAddress netmask, InetAddress ip) Checks if a subnet contains a specific IP address.
Parameters: network - The network address. Parameters: netmask - The subnet mask. Parameters: ip - The IP address to check. | public static InetAddress | getAddress(String string) Converts a string to an IP addres.
Parameters: string - The IP address, represented by a string. | public static int | getClassPart(InetAddress ip, int partNumber) Returns the n-th part of an InetAddress.
Parameters: ip - The address. Parameters: partNumber - The number of the part. |
InetAddressUtil | public InetAddressUtil(Logger logger)(Code) | | Ctor.
Parameters: logger - The logger. |
checkNetmask | public int checkNetmask(InetAddress netmask)(Code) | | Check netmask, e.g. 255.255.255.240 is fine, 255.255.240.16 is illegal (needs to be 255.255.240.0)
Parameters: netmask - The netmask address. An integer value. -1 if illegal netmask, otherwise 0, 1, 2, 3InetAddressUtil.contains |
contains | public boolean contains(InetAddress network, InetAddress netmask, InetAddress ip)(Code) | | Checks if a subnet contains a specific IP address.
Parameters: network - The network address. Parameters: netmask - The subnet mask. Parameters: ip - The IP address to check. A boolean value. |
getClassPart | public static int getClassPart(InetAddress ip, int partNumber)(Code) | | Returns the n-th part of an InetAddress.
Parameters: ip - The address. Parameters: partNumber - The number of the part. An integer value.InetAddressUtil.contains |
|
|