code: public static boolean isNumeric(String address) {
          InetAddress inetAddress = parseNumericAddressNoThrow(address);
          return inetAddress != null && disallowDeprecatedFormats(address, inetAddress) != null;
      }
docs: Returns true if the string is a valid numeric IPv4 or IPv6 address (such as "192.168.0.1").
  This copes with all forms of address that Java supports, detailed in the {@link InetAddress}
  class documentation.
  
  @hide used by frameworks/base to ensure that a getAllByName won't cause a DNS lookup.