Search Options

Display Count
Sort
Preferred Language
Advanced Search

Results 1 - 3 of 3 for requireBracketsForIPv6 (0.16 seconds)

  1. android/guava/src/com/google/common/net/HostAndPort.java

     * An immutable representation of a host and port.
     *
     * <p>Example usage:
     *
     * {@snippet :
     * HostAndPort hp =
     *     HostAndPort.fromString("[2001:db8::1]")
     *         .withDefaultPort(80)
     *         .requireBracketsForIPv6();
     * hp.getHost();  // returns "2001:db8::1"
     * hp.getPort();  // returns 80
     * hp.toString(); // returns "[2001:db8::1]:80"
     * }
     *
     * <p>Here are some examples of recognized formats:
     *
     * <ul>
    Created: Fri Apr 03 12:43:13 GMT 2026
    - Last Modified: Mon Feb 23 19:19:10 GMT 2026
    - 11.1K bytes
    - Click Count (0)
  2. android/guava-tests/test/com/google/common/net/HostAndPortTest.java

        assertThat(HostAndPort.fromString("[::1]").requireBracketsForIPv6().getHost()).isEqualTo("::1");
        assertThat(HostAndPort.fromString("[::1]:80").requireBracketsForIPv6().getHost())
            .isEqualTo("::1");
        // Non-bracketed non-IPv6 works fine.
        assertThat(HostAndPort.fromString("x").requireBracketsForIPv6().getHost()).isEqualTo("x");
        assertThat(HostAndPort.fromString("x:80").requireBracketsForIPv6().getHost()).isEqualTo("x");
    
    Created: Fri Apr 03 12:43:13 GMT 2026
    - Last Modified: Mon Mar 16 15:59:55 GMT 2026
    - 9.7K bytes
    - Click Count (0)
  3. guava-tests/test/com/google/common/net/HostAndPortTest.java

        assertThat(HostAndPort.fromString("[::1]").requireBracketsForIPv6().getHost()).isEqualTo("::1");
        assertThat(HostAndPort.fromString("[::1]:80").requireBracketsForIPv6().getHost())
            .isEqualTo("::1");
        // Non-bracketed non-IPv6 works fine.
        assertThat(HostAndPort.fromString("x").requireBracketsForIPv6().getHost()).isEqualTo("x");
        assertThat(HostAndPort.fromString("x:80").requireBracketsForIPv6().getHost()).isEqualTo("x");
    
    Created: Fri Apr 03 12:43:13 GMT 2026
    - Last Modified: Mon Mar 16 15:59:55 GMT 2026
    - 10K bytes
    - Click Count (0)
Back to Top