Lines Matching refs:host

37  * {@code http://username:password@host:8080/directory/file?query#fragment}
41 * <tr><td>{@link #getSchemeSpecificPart() Scheme-specific part}</td><td>{@code //username:password@host:8080/directory/file?query#fragment}</td><td></td></tr>
42 * <tr><td>{@link #getAuthority() Authority} </td><td>{@code username:password@host:8080} </td><td></td></tr>
44 * <tr><td>{@link #getHost() Host} </td><td>{@code host} </td><td></td></tr>
88 * has an authority, user info, host, port, path or query. An opaque URIs may
107 * {@code http://user:pa55w%3Frd@host:80/doc%7Csearch?q=green%20robots#over%206%22}
111 * <tr><td>Scheme-specific part</td><td>{@code 0-9}, {@code a-z}, {@code A-Z}, {@code _-!.~'()*,;:$&+=?/[]@}</td><td>Non-ASCII characters okay </td><td>{@code //user:pa55w%3Frd@host:80/doc%7Csearch?q=green%20robots}</td><td>{@code //user:pa55w?rd@host:80/doc|search?q=green robots}</td></tr>
112 * <tr><td>Authority </td><td>{@code 0-9}, {@code a-z}, {@code A-Z}, {@code _-!.~'()*,;:$&+=@[]} </td><td>Non-ASCII characters okay </td><td>{@code user:pa55w%3Frd@host:80} </td><td>{@code user:pa55w?rd@host:80}</td></tr>
114 * <tr><td>Host </td><td>{@code 0-9}, {@code a-z}, {@code A-Z}, {@code -.[]} </td><td>Domain name, IPv4 address or [IPv6 address] </td><td> </td><td>host</td></tr>
120 * A URI's host, port and scheme are not eligible for encoding and must not
185 private transient String host;
235 public URI(String scheme, String userInfo, String host, int port, String path, String query,
237 if (scheme == null && userInfo == null && host == null && path == null
253 if (userInfo != null || host != null || port != -1) {
262 if (host != null) {
264 if (host.indexOf(':') != -1 && host.indexOf(']') == -1 && host.indexOf('[') == -1) {
265 host = "[" + host + "]";
267 uri.append(host);
297 public URI(String scheme, String host, String path, String fragment) throws URISyntaxException {
298 this(scheme, null, host, -1, path, null, fragment);
346 * info, host and port:
347 * [user-info@][host][:port]
427 * Breaks this URI's authority into user info, host and port parts.
428 * [user-info@][host][:port]
449 temp = temp.substring(index + 1); // host[:port] is left
459 // determine port and host
486 throw new URISyntaxException(authority, "Expected host", hostIndex);
496 // fill in the userInfo, host and port fields
498 host = tempHost;
514 * Returns true if {@code host} is a well-formed host name or IP address.
516 * @param forceServer true to always throw if the host cannot be parsed. If
520 private boolean isValidHost(boolean forceServer, String host) throws URISyntaxException {
521 if (host.startsWith("[")) {
523 if (!host.endsWith("]")) {
524 throw new URISyntaxException(host,
527 if (InetAddress.isNumeric(host)) {
532 throw new URISyntaxException(host, "Malformed IPv6 address");
536 // of the host name
537 if (host.indexOf('[') != -1 || host.indexOf(']') != -1) {
538 throw new URISyntaxException(host, "Illegal character in host name", 0);
541 int index = host.lastIndexOf('.');
542 if (index < 0 || index == host.length() - 1
543 || !Character.isDigit(host.charAt(index + 1))) {
545 if (isValidDomainName(host)) {
549 throw new URISyntaxException(host, "Illegal character in host name", 0);
556 InetAddress ia = InetAddress.parseNumericAddress(host);
564 throw new URISyntaxException(host, "Malformed IPv4 address", 0);
569 private boolean isValidDomainName(String host) {
571 UriCodec.validateSimple(host, "-.");
577 for (String token : host.split("\\.")) {
588 if (!lastLabel.equals(host)) {
647 if (host != null && uri.host != null) {
648 // both are server based, so compare userInfo, host, port
661 ret = host.compareToIgnoreCase(uri.host);
736 clone.host = host;
843 if (uri.host != null && host == null || uri.host == null
844 && host != null) {
846 } else if (uri.host == null && host == null) {
849 } else { // uri.host != null && host != null, so server-based
850 if (!host.equalsIgnoreCase(uri.host)) {
935 * Returns the host of this URI, or null if this URI has no host.
938 return host;
1089 * host, port, and user-info. If this URI is already determined as a
1300 * toString() method. But this method converts scheme and host to lowercase,
1314 if (host == null) {
1320 result.append(host.toLowerCase(Locale.US));