private static boolean isIPv6(String host){
  return host.contains(":");
}

private static boolean isIPv6 ( String host ) { return host . contains ( ":" ) ; }
checks if the given host name string contains ' : ' as in ipv6 host address .
