Class IPWithSubnetChecker
- java.lang.Object
-
- com.github.markusbernhardt.proxy.selector.whitelist.IPWithSubnetChecker
-
public class IPWithSubnetChecker extends Object
Checks if the given string is a IP4 range subnet definition of the format 192.168.0/24 Based on a contribution by Jan Engler- Author:
- Markus Bernhardt, Copyright 2016, Bernd Rosstauscher, Copyright 2009
-
-
Constructor Summary
Constructors Constructor Description IPWithSubnetChecker()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static booleanisValidIP4Range(String possibleIPAddress)Tests if a given string is of in the correct format for an IP4 subnet mask.static booleanisValidIP6Range(String possibleIPAddress)Tests if a given string is of in the correct format for an IP6 subnet mask.
-
-
-
Method Detail
-
isValidIP4Range
public static boolean isValidIP4Range(String possibleIPAddress)
Tests if a given string is of in the correct format for an IP4 subnet mask.- Parameters:
possibleIPAddress- to test for valid format.- Returns:
- true if valid else false.
-
isValidIP6Range
public static boolean isValidIP6Range(String possibleIPAddress)
Tests if a given string is of in the correct format for an IP6 subnet mask.- Parameters:
possibleIPAddress- to test for valid format.- Returns:
- true if valid else false.
-
-