Class IPManipulator

java.lang.Object
  extended by IPManipulator

public class IPManipulator
extends java.lang.Object


Constructor Summary
IPManipulator()
           
 
Method Summary
static int commonMask(int startIp, int endIp)
           
static java.lang.String int2ip(int i)
          Translate a 32-bits integer to an IP
static int ip2int(java.lang.String ip)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

IPManipulator

public IPManipulator()
Method Detail

int2ip

public static java.lang.String int2ip(int i)
Translate a 32-bits integer to an IP

Parameters:
i -
Returns:
ip String in dot form

ip2int

public static int ip2int(java.lang.String ip)
Parameters:
ip - in dot form
Returns:
32-bits integer representing the IP

commonMask

public static int commonMask(int startIp,
                             int endIp)
Parameters:
startIp -
endIp -
Returns:
the common mask between startIp and endIp or 0 if there is no common mask