|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectverinec.netsim.addresses.IPAddress
verinec.netsim.addresses.IPAddressNetmask
public class IPAddressNetmask
This Class represents an IPAddress with Netmask. Convert applies the Netmask to the IPAddress. e.g. IPAddress 192.168.0.1 with Netmask 255.255.255.0. If the Netmask is applied to the Address 192.168.0.0 is returned.
| Field Summary | |
|---|---|
private IPAddress |
netmask
|
| Constructor Summary | |
|---|---|
IPAddressNetmask()
Constructs a new IPAddress 0.0.0.0 with Netmask 0.0.0.0 |
|
IPAddressNetmask(byte i0,
byte i1,
byte i2,
byte i3)
Constructs a new IP Address with the Value i0.i1.i2.i3 and Netmask 0.0.0.0 |
|
IPAddressNetmask(byte i0,
byte i1,
byte i2,
byte i3,
byte n0,
byte n1,
byte n2,
byte n3)
Constructs a new IP Address with the Value i0.i1.i2.i3 and Netmask n0.n1.n2.n3 |
|
IPAddressNetmask(String ipaddress,
String netmask)
Constructs a new IPAddress with Netmask form a String. |
|
| Method Summary | |
|---|---|
IPAddress |
convert()
Applies the Netmask to the IPAddress It calculates bitwise or between Address and Netmask. |
IPAddress |
convert(IPAddress address)
Applies the Netmask to an IPAddress. |
boolean |
equals(IPAddress address)
Applies the Netmask to this IPAddress and the IPAddress given as parameter and then it compares the two resulting Addresses. |
IPAddress |
getNetmask()
this method returns the Nemask. |
| Methods inherited from class verinec.netsim.addresses.IPAddress |
|---|
compareTo, compareTo, compareToDigitByDigit, equals, getPart, getsubnetMask, setPart, toByteArray, toInetAddress, toString |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
private IPAddress netmask
| Constructor Detail |
|---|
public IPAddressNetmask()
public IPAddressNetmask(byte i0,
byte i1,
byte i2,
byte i3)
i0 - first byte of the Addressi1 - second byte of the Addressi2 - third byte of the Addressi3 - fourth byte of the Address
public IPAddressNetmask(byte i0,
byte i1,
byte i2,
byte i3,
byte n0,
byte n1,
byte n2,
byte n3)
i0 - first byte of the Addressi1 - second byte of the Addressi2 - third byte of the Addressi3 - fourth byte of the Addressn0 - first byte of the Netmaskn1 - second byte of the Netmaskn2 - third byte of the Netmaskn3 - fourth byte of the Netmask
public IPAddressNetmask(String ipaddress,
String netmask)
ipaddress - address in String representation with "."s between the four
bytes.netmask - netmask in String representation with "."s between the four
bytes.| Method Detail |
|---|
public IPAddress convert()
public IPAddress convert(IPAddress address)
address - an address to convert
public boolean equals(IPAddress address)
address - an IPAddress to be comapred with this Address.
public IPAddress getNetmask()
|
Copyright © 2005 Verinec, DIUF | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||