- Sort Score
- Num 10 results
- Language All
Results 1 - 2 of 2 for toUriString (0.28 seconds)
-
android/guava/src/com/google/common/net/InetAddresses.java
* IP address string joined by a "/". * * @param ip {@link InetAddress} to be converted to URI string literal * @return {@code String} containing URI-safe string literal */ public static String toUriString(InetAddress ip) { if (ip instanceof Inet6Address) { return "[" + toAddrString(ip) + "]"; } return toAddrString(ip); } /**Created: Fri Apr 03 12:43:13 GMT 2026 - Last Modified: Thu Mar 19 18:53:45 GMT 2026 - 47.7K bytes - Click Count (0) -
guava-tests/test/com/google/common/net/InetAddressesTest.java
assertThat(InetAddresses.toUriString(ip)).isEqualTo("1.2.3.4"); } public void testToUriStringIPv6() { // Unfortunately the InetAddress.toString() method for IPv6 addresses // does not collapse contiguous shorts of zeroes with the :: abbreviation. String ipStr = "3ffe::1"; InetAddress ip = InetAddresses.forString(ipStr); assertThat(InetAddresses.toUriString(ip)).isEqualTo("[3ffe::1]"); }
Created: Fri Apr 03 12:43:13 GMT 2026 - Last Modified: Mon Mar 23 16:38:16 GMT 2026 - 36.3K bytes - Click Count (0)