net.anotheria.net.util
Class IPRange
java.lang.Object
net.anotheria.net.util.IPRange
public class IPRange
- extends Object
Storage class for a single ip range. Ip range is specified by an ip
adress and a byte mask. 10.0.0.0/8, 192.168.0.0/16 or 127.0.0.1/8 are
examples for private networks.
- Author:
- lrosenberg
|
Constructor Summary |
IPRange(String ipAdress,
int mask)
Creates new IPRange with given ipAdress and mask. |
IPRange
public IPRange(String ipAdress,
int mask)
- Creates new IPRange with given ipAdress and mask.
- Parameters:
ipAdress - mask -
mayPass
public boolean mayPass(String ip)
- Check whether or not ip param is in the current range.
- Parameters:
ip - to check
- Returns:
- true if ip param in the current range
toString
public String toString()
- Overrides:
toString in class Object
Copyright © 2010-2013 anotheria.net. All Rights Reserved.