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

Method toUriString

output/java_guava/1.4.19/InetAddresses.java:449–454  ·  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

447
448
449 public static String toUriString(InetAddress ip) {
450 if (ip instanceof Inet6Address) {
451 return "[" + toAddrString(ip) + "]";
452 }
453 return toAddrString(ip);
454 }
455
456 /**
457 * 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