org.opennms.netmgt.discovery
Class IPAddressRange

java.lang.Object
  extended by org.opennms.netmgt.discovery.IPAddressRange

public final class IPAddressRange
extends java.lang.Object

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.

Author:
Sowmya , Brian Weaver , OpenNMS

Method Summary
static long convertToLong(byte[] addr)
          Deprecated. Use org.opennms.netmgt.utils.IPSorter.convertToLong() instead.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

convertToLong

public static long convertToLong(byte[] addr)
Deprecated. Use org.opennms.netmgt.utils.IPSorter.convertToLong() instead.

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.

Parameters:
addr - The array to convert to a long.
Returns:
The created long value.
Throws:
java.lang.IllegalArgumentException - Thrown if the addr parameter is null.


Copyright © 2007. All Rights Reserved.