private static boolean
validatePrefixLength(int family, int prefixLength) {
	if (prefixLength < 0 || prefixLength >= 256)
		return false;
	if ((family == Address.IPv4 && prefixLength > 32) ||
	    (family == Address.IPv6 && prefixLength > 128))
		return false;
	return true;
}
Creates an APL element corresponding to an IPv4 or IPv6 prefix.
@param negative Indicates if this prefix is a negation.
@param address The IPv4 or IPv6 address.
@param prefixLength The length of this prefix, in bits.
@throws IllegalArgumentException The prefix length is invalid.
src/main/java/core/org/xbill/DNS/APLRecord.java