|
||||||||||
| 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(java.lang.String netAddress)
|
static IPAddr |
getAddress(java.lang.String netAddress,
int maskLength)
Get ipAddress for the given String and netmask |
static java.lang.String |
getInAddress(java.lang.String ipAddress)
This method return the InAddress for the given ip. |
java.lang.String |
getIPAddress()
|
java.lang.String |
getMaskedIPAddress()
|
int |
getMaskLength()
Get mask length |
java.lang.String |
getNibbleFormat()
Return the NibbleFormat of the IPAddr |
static java.lang.String |
getProperIpAddress(java.lang.String ip)
This method convert the given ip to the proper format. |
static java.lang.String |
getReadableIP(java.lang.String ip)
This method try to covnert an ip address to an easy readable ip. |
java.lang.String |
getReverseIP()
Get reverse ipAddress |
static boolean |
isIPAddr(java.lang.String data)
Check if a the Object is instance of this class |
static boolean |
isIPV6(java.lang.String ip)
Return if the given ipAddress is ipv6 |
static boolean |
isValidIP(java.lang.String ip)
Check if the given IP is valid. |
void |
setMask(int maskLength)
create series of 16 bit masks for each ip block |
static java.lang.String |
stripDot(java.lang.String data)
Strip the last char of a string when it ends with a dot |
java.lang.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(java.lang.String netAddress,
int maskLength)
throws PermErrorException
netAddress - The ipAddress given as StringmaskLength - The netmask
PermErrorException - on error
public static IPAddr getAddress(java.lang.String netAddress)
throws PermErrorException
PermErrorExceptiongetAddress(String, int)public static boolean isIPAddr(java.lang.String data)
data - The object to check
public void setMask(int maskLength)
maskLength - The netmaskpublic static java.lang.String stripDot(java.lang.String data)
data - The String where the dot should removed
public java.lang.String getIPAddress()
getInAddress(String)public java.lang.String getMaskedIPAddress()
getIPAddress(int[])public java.lang.String getNibbleFormat()
public java.lang.String getReverseIP()
public int getMaskLength()
public java.lang.String toString()
toString in class java.lang.Object
public static java.lang.String getInAddress(java.lang.String ipAddress)
throws PermErrorException
ipAddress - -
ipAddress that should be processed
PermErrorException - if the ipAddress is not valid (rfc conform)public static boolean isValidIP(java.lang.String ip)
ip - The ipaddress to check
public static boolean isIPV6(java.lang.String ip)
ip - The ipAddress
public static java.lang.String getReadableIP(java.lang.String ip)
ip - The ip which should be tried to convert
public static java.lang.String getProperIpAddress(java.lang.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 | |||||||||