rabbit.util
Class IPAccess

java.lang.Object
  extended by rabbit.util.IPAccess

public class IPAccess
extends Object

A class to handle access to ip ranges.

Author:
Robert Olofsson

Constructor Summary
IPAccess(InetAddress lowip, InetAddress highip)
          Create a new IPAccess with given ip-range.
 
Method Summary
 boolean inrange(InetAddress ia)
          check if a given ip is in this accessrange
 String toString()
          get the string representation of this access.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

IPAccess

public IPAccess(InetAddress lowip,
                InetAddress highip)
Create a new IPAccess with given ip-range.

Parameters:
lowip - the lowest ip in the range
highip - the highest ip in the range
Method Detail

inrange

public boolean inrange(InetAddress ia)
check if a given ip is in this accessrange

Parameters:
ia - the ip we are testing.
Returns:
true if ia is in the range (inclusive), false otherwise

toString

public String toString()
get the string representation of this access.

Overrides:
toString in class Object