MCPcopy Create free account
hub / github.com/antlr/codebuff / toUriString

Method toUriString

output/java_guava/1.4.18/InetAddresses.java:448–453  ·  view source on GitHub ↗

Returns the string representation of an InetAddress suitable for inclusion in a URI. For IPv4 addresses, this is identical to InetAddress#getHostAddress(), but for IPv6 addresses it compresses zeroes and surrounds the text with square brackets; for example "[2001:db8::1]"

(InetAddress ip)

Source from the content-addressed store, hash-verified

446
447
448 public static String toUriString(InetAddress ip) {
449 if (ip instanceof Inet6Address) {
450 return "[" + toAddrString(ip) + "]";
451 }
452 return toAddrString(ip);
453 }
454
455 /**
456 * Returns an InetAddress representing the literal IPv4 or IPv6 host portion of a URL, encoded in

Callers 1

fromValidMethod · 0.95

Calls 1

toAddrStringMethod · 0.95

Tested by

no test coverage detected