|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.eurotech.framework.protocol.pcn.IpAddress
public class IpAddress
Container for an IP address value.
Field Summary | |
---|---|
int |
b0
First octet of IP address |
int |
b1
Second octet of IP address |
int |
b2
Third octet of IP address |
int |
b3
Fourth octet of IP address |
Constructor Summary | |
---|---|
IpAddress()
Default constructor, sets IP to 0.0.0.0 |
|
IpAddress(int ip)
Convert IP as integer to an IpAddress object |
|
IpAddress(String ipAddressAsString)
Convert IP as String in dotted notation, to an IpAddress object |
Method Summary | |
---|---|
int |
asInteger()
Returns value of IP address as integer. |
void |
maskByInvertedSubnet(IpAddress subnet)
Masks the IpAddress by the inversion of subnet, to obtain a numeric IP broadcast address. |
void |
maskBySubnet(IpAddress subnet)
Masks the IpAddress by the specified subnet, to obtain a numeric IP network identifier. |
String |
toString()
Returns IP address in dotted notation |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public int b0
public int b1
public int b2
public int b3
Constructor Detail |
---|
public IpAddress()
public IpAddress(int ip)
ip
- - IP address as int
public IpAddress(String ipAddressAsString)
ipAddressAsString
- IP in dotted notationMethod Detail |
---|
public int asInteger()
public void maskBySubnet(IpAddress subnet)
subnet
- as IpAddress
typepublic void maskByInvertedSubnet(IpAddress subnet)
subnet
- as IpAddress
typepublic String toString()
toString
in class Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |