|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.james.jspf.core.IPAddr
public class IPAddr
| Method Summary | |
|---|---|
static IPAddr |
getAddress(String netAddress)
|
static IPAddr |
getAddress(String netAddress,
int maskLength)
Get ipAddress for the given String and netmask |
static String |
getInAddress(String ipAddress)
This method return the InAddress for the given ip. |
String |
getIPAddress()
|
String |
getMaskedIPAddress()
|
int |
getMaskLength()
Get mask length |
String |
getNibbleFormat()
Return the NibbleFormat of the IPAddr |
static String |
getProperIpAddress(String ip)
This method convert the given ip to the proper format. |
static String |
getReadableIP(String ip)
This method try to covnert an ip address to an easy readable ip. |
String |
getReverseIP()
Get reverse ipAddress |
static boolean |
isIPAddr(String data)
Check if a the Object is instance of this class |
static boolean |
isIPV6(String ip)
Return if the given ipAddress is ipv6 |
static boolean |
isValidIP(String ip)
Check if the given IP is valid. |
void |
setMask(int maskLength)
create series of 16 bit masks for each ip block |
static String |
stripDot(String data)
Strip the last char of a string when it ends with a dot |
String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Method Detail |
|---|
public static IPAddr getAddress(String netAddress,
int maskLength)
throws PermErrorException
netAddress - The ipAddress given as StringmaskLength - The netmask
PermErrorException - on error
public static IPAddr getAddress(String netAddress)
throws PermErrorException
PermErrorExceptiongetAddress(String, int)public static boolean isIPAddr(String data)
data - The object to check
public void setMask(int maskLength)
maskLength - The netmaskpublic static String stripDot(String data)
data - The String where the dot should removed
public String getIPAddress()
getInAddress(String)public String getMaskedIPAddress()
getIPAddress(int[])public String getNibbleFormat()
public String getReverseIP()
public int getMaskLength()
public String toString()
toString in class Object
public static String getInAddress(String ipAddress)
throws PermErrorException
ipAddress - -
ipAddress that should be processed
PermErrorException - if the ipAddress is not valid (rfc conform)public static boolean isValidIP(String ip)
ip - The ipaddress to check
public static boolean isIPV6(String ip)
ip - The ipAddress
public static String getReadableIP(String ip)
ip - The ip which should be tried to convert
public static String getProperIpAddress(String ip)
throws PermErrorException
ip - the ipAddress to convert
PermErrorException - if the given ipAddress is invalid
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||