rabbit.util
Class IPAccess

java.lang.Object
  extended byrabbit.util.IPAccess

public class IPAccess
extends java.lang.Object

A class to handle access to ip ranges.


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

Constructor Detail

IPAccess

public IPAccess(java.net.InetAddress lowip,
                java.net.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(java.net.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 java.lang.String toString()
get the string representation of this access.