public static boolean checkIPMatching (String ip, List<String> allowedKeys, String unlimitedKeys[]) {
	//		 Keys can be of the forms
			// - "192.168.0.", e.g. positively matching "192.168.0.1"
			// - "192.168.0.1", matching only "192.168.0.1"
			// - "192.", matching "192.169.130.120"
			for (String currentAllowed : allowedKeys) {
				if (ip.equals(currentAllowed)
						|| (currentAllowed.endsWith(".") && ip.startsWith(currentAllowed))) {
					for (String currentUnlimited : unlimitedKeys) {
						if (currentUnlimited.equals(currentAllowed)) {
							// the prefix/host is excactly in unlimited (and the prefixes are sorted):
							// be unlimited
							return true;
						}
					}
					// not unlimited here for this prefix, continue evaluating
				}
			}
			// no match: we are not unlimited
			return false;
		}