public static int
familyOf(InetAddress address) {
	if (address instanceof Inet4Address)
		return IPv4;
	if (address instanceof Inet6Address)
		return IPv6;
	throw new IllegalArgumentException("unknown address family");
}
Returns the family of an InetAddress.
@param address The supplied address.
@return The family, either IPv4 or IPv6.
src/main/java/core/org/xbill/DNS/Address.java