/** * @param host either a regular hostname, International Domain Name, IPv4 address, or IPv6 * address. */ public Builder host(String host) { if (host == null) throw new NullPointerException("host == null"); String encoded = canonicalizeHost(host, 0, host.length()); if (encoded == null) throw new IllegalArgumentException("unexpected host: " + host); this.host = encoded; return this; }
/** * @param host either a regular hostname, International Domain Name, IPv4 address, or IPv6 * address. */ public Builder host(String host) { if (host == null) throw new NullPointerException("host == null"); String encoded = canonicalizeHost(host, 0, host.length()); if (encoded == null) throw new IllegalArgumentException("unexpected host: " + host); this.host = encoded; return this; }
host = canonicalizeHost(input, pos, portColonOffset); port = parsePort(input, portColonOffset + 1, componentDelimiterOffset); if (port == -1) { host = canonicalizeHost(input, pos, portColonOffset); port = defaultPort(scheme);
this.host = canonicalizeHost(input, pos, portColonOffset); this.port = parsePort(input, portColonOffset + 1, componentDelimiterOffset); if (this.port == -1) return ParseResult.INVALID_PORT; // Invalid port. } else { this.host = canonicalizeHost(input, pos, portColonOffset); this.port = defaultPort(this.scheme);
host = canonicalizeHost(input, pos, portColonOffset); port = parsePort(input, portColonOffset + 1, componentDelimiterOffset); if (port == -1) { host = canonicalizeHost(input, pos, portColonOffset); port = defaultPort(scheme);
this.host = canonicalizeHost(input, pos, portColonOffset); this.port = parsePort(input, portColonOffset + 1, componentDelimiterOffset); if (this.port == -1) return ParseResult.INVALID_PORT; // Invalid port. } else { this.host = canonicalizeHost(input, pos, portColonOffset); this.port = defaultPort(this.scheme);
this.host = canonicalizeHost(input, pos, portColonOffset); this.port = parsePort(input, portColonOffset + 1, componentDelimiterOffset); if (this.port == -1) return ParseResult.INVALID_PORT; // Invalid port. } else { this.host = canonicalizeHost(input, pos, portColonOffset); this.port = defaultPort(this.scheme);
this.host = canonicalizeHost(input, pos, portColonOffset); this.port = parsePort(input, portColonOffset + 1, componentDelimiterOffset); if (this.port == -1) return ParseResult.INVALID_PORT; // Invalid port. } else { this.host = canonicalizeHost(input, pos, portColonOffset); this.port = defaultPort(this.scheme);
/** * @param host either a regular hostname, International Domain Name, IPv4 address, or IPv6 * address. */ public Builder host(String host) { if (host == null) throw new IllegalArgumentException("host == null"); String encoded = canonicalizeHost(host, 0, host.length()); if (encoded == null) throw new IllegalArgumentException("unexpected host: " + host); this.host = encoded; return this; }
/** * @param host either a regular hostname, International Domain Name, IPv4 address, or IPv6 * address. */ public Builder host(String host) { if (host == null) throw new NullPointerException("host == null"); String encoded = canonicalizeHost(host, 0, host.length()); if (encoded == null) throw new IllegalArgumentException("unexpected host: " + host); this.host = encoded; return this; }
/** * @param host either a regular hostname, International Domain Name, IPv4 address, or IPv6 * address. */ public Builder host(String host) { if (host == null) throw new NullPointerException("host == null"); String encoded = canonicalizeHost(host, 0, host.length()); if (encoded == null) throw new IllegalArgumentException("unexpected host: " + host); this.host = encoded; return this; }
/** * @param host either a regular hostname, International Domain Name, IPv4 address, or IPv6 * address. */ public Builder host(String host) { if (host == null) throw new IllegalArgumentException("host == null"); String encoded = canonicalizeHost(host, 0, host.length()); if (encoded == null) throw new IllegalArgumentException("unexpected host: " + host); this.host = encoded; return this; }
/** * @param host either a regular hostname, International Domain Name, IPv4 address, or IPv6 * address. */ public Builder host(String host) { if (host == null) throw new IllegalArgumentException("host == null"); String encoded = canonicalizeHost(host, 0, host.length()); if (encoded == null) throw new IllegalArgumentException("unexpected host: " + host); this.host = encoded; return this; }
host = canonicalizeHost(input, pos, portColonOffset); port = parsePort(input, portColonOffset + 1, componentDelimiterOffset); if (port == -1) { host = canonicalizeHost(input, pos, portColonOffset); port = defaultPort(scheme);