Package org.elasticsearch.common.network
Class Cidrs
java.lang.Object
org.elasticsearch.common.network.Cidrs
-
Method Summary
Modifier and TypeMethodDescriptionstatic long[]
cidrMaskToMinMax(String cidr)
Parses an IPv4 address block in CIDR notation into a pair of longs representing the bottom and top of the address blockstatic String
createCIDR(long ipAddress, int networkMask)
-
Method Details
-
cidrMaskToMinMax
Parses an IPv4 address block in CIDR notation into a pair of longs representing the bottom and top of the address block- Parameters:
cidr
- an address block in CIDR notation a.b.c.d/n- Returns:
- array representing the address block
- Throws:
IllegalArgumentException
- if the cidr can not be parsed
-
createCIDR
-