public class PlainIPFilter extends Object
| Constructor and Description |
|---|
PlainIPFilter()
Creates a new filter.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addRange(String ipAdress,
int mask)
Adds an ip (allowed)range to the filter.
|
boolean |
mayPass(String ipAddress)
Returns true if the parameter ip-adress is in one of the configured
ranges.
|
static boolean |
mayPass(String ipAddress,
List<IPRange> ranges)
Returns true if the parameter ip-adress is in one of the ranges.
|
String |
toString() |
public void addRange(String ipAdress, int mask)
ipAdress - an adress.mask - a network (byte)mask.public static boolean mayPass(String ipAddress, List<IPRange> ranges)
ipAdress - the adress to check.ranges - to pass throughpublic boolean mayPass(String ipAddress)
ipAdress - the adress to check.Copyright © 2010-2014 anotheria.net. All Rights Reserved.