public static InetAddress
getByAddress(String addr) throws UnknownHostException {
	byte [] bytes;
	bytes = toByteArray(addr, IPv4);
	if (bytes != null)
		return InetAddress.getByAddress(addr, bytes);
	bytes = toByteArray(addr, IPv6);
	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.
The address can be either IPv4 or IPv6.
@param addr The address, in string form
@return The IP addresses
@exception UnknownHostException The address is not a valid IP address.
src/main/java/core/org/xbill/DNS/Address.java