public static InetAddress
getByAddress(String addr, int family) throws UnknownHostException {
	if (family != IPv4 && family != IPv6)
		throw new IllegalArgumentException("unknown address family");
	byte [] bytes;
	bytes = toByteArray(addr, family);
	if (bytes != null)
		return InetAddress.getByAddress(addr, bytes);
	throw new UnknownHostException("Invalid address: " + addr);
}
Converts an address from its string representation to an IP address in
a particular family.
@param addr The address, in string form
@param family The address family, either IPv4 or IPv6.
@return The IP addresses
@exception UnknownHostException The address is not a valid IP address in
the specified address family.
src/main/java/core/org/xbill/DNS/Address.java