public static boolean
isDottedQuad(String s) {
	byte [] address = Address.toByteArray(s, IPv4);
	return (address != null);
}
Determines if a string contains a valid IP address.
@param s The string
@return Whether the string contains a valid IP address
src/main/java/core/org/xbill/DNS/Address.java