|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.opennms.netmgt.discovery.IPAddressRange
public final class IPAddressRange
The IPAddressRange object is used to encapsulate the starting and ending points of a continguous IPv4 Address range. The class can then generate either an Enumeration or Iterator that can be used to cycle through the range of addresses by the object's user.
| Method Summary | |
|---|---|
static long |
convertToLong(byte[] addr)
Deprecated. Use org.opennms.netmgt.utils.IPSorter.convertToLong() instead. |
java.util.Iterator<java.net.InetAddress> |
iterator()
Returns an Iterator object that can be used to step through all the address encapsulated in the object. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public java.util.Iterator<java.net.InetAddress> iterator()
Returns an Iterator object that can be used to step through all the address encapsulated in the object.
The iterator returns objects of type
InetAddressor null if the
address is unknown.
iterator in interface java.lang.Iterable<java.net.InetAddress>InetAddresspublic static long convertToLong(byte[] addr)
The convertToLong method takes an array of bytes and shifts them into a long value. The bytes at the front of the array are shifted into the MSB of the long as each new byte is added to the LSB of the long. if the array is of sufficent size the first bytes of the array may be shifted out of the returned long.
addr - The array to convert to a long.
java.lang.IllegalArgumentException - Thrown if the addr parameter is null.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||