Class IPWithSubnetChecker
java.lang.Object
com.github.markusbernhardt.proxy.selector.whitelist.IPWithSubnetChecker
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
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic boolean
isValidIP4Range
(String possibleIPAddress) Tests if a given string is of in the correct format for an IP4 subnet mask.static boolean
isValidIP6Range
(String possibleIPAddress) Tests if a given string is of in the correct format for an IP6 subnet mask.
-
Field Details
-
IP_SUB_PATTERN
-
IP6_SUB_PATTERN
-
-
Constructor Details
-
IPWithSubnetChecker
public IPWithSubnetChecker()
-
-
Method Details
-
isValidIP4Range
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
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.
-