public final class Cidrs
extends java.lang.Object
Modifier and Type | Method and Description |
---|---|
static long[] |
cidrMaskToMinMax(java.lang.String cidr)
Parses an IPv4 address block in CIDR notation into a pair of
longs representing the bottom and top of the address block
|
static java.lang.String |
createCIDR(long ipAddress,
int networkMask) |
public static long[] cidrMaskToMinMax(java.lang.String cidr)
cidr
- an address block in CIDR notation a.b.c.d/njava.lang.IllegalArgumentException
- if the cidr can not be parsedpublic static java.lang.String createCIDR(long ipAddress, int networkMask)