public class IPUtil
extends java.lang.Object
Constructor and Description |
---|
IPUtil() |
Modifier and Type | Method and Description |
---|---|
static long |
breakoutSubnetAddress(long ip,
int mask)
return the network address
|
static java.lang.String |
breakoutSubnetAddress(java.lang.String ip,
java.lang.String subnetMask)
return the network address
|
static long[] |
calculateNodesPerNetwork(java.lang.String netAddress,
java.lang.String subnetMask)
return the 1st ip & the last ip of this network
|
static java.lang.String |
formatLongToIp(long ip)
format a 'aaa.bbb.ccc.ddd' representation of an ip given by a 'long' representation
|
static long |
parseSubnetToLong(java.lang.String ip)
return a 'long' representation of a subnet ip
|
public static long parseSubnetToLong(java.lang.String ip) throws java.lang.Exception
ip
- the ipjava.lang.Exception
public static java.lang.String formatLongToIp(long ip)
ip
- the ippublic static java.lang.String breakoutSubnetAddress(java.lang.String ip, java.lang.String subnetMask) throws java.lang.Exception
ip
- the ipsubnetMask
- the maskjava.lang.Exception
public static long[] calculateNodesPerNetwork(java.lang.String netAddress, java.lang.String subnetMask) throws java.lang.Exception
netAddress
- network addresssubnetMask
- network maskjava.lang.Exception
public static long breakoutSubnetAddress(long ip, int mask) throws java.lang.Exception
ip
- the ipmask
- the maskjava.lang.Exception
Documentation Feedback
Copyright 2012 Micro Focus or one of its affiliates.