Codota Logo
InternetDomainName.name
Code IndexAdd Codota to your IDE (free)

How to use
name
method
in
com.google.common.net.InternetDomainName

Best Java code snippets using com.google.common.net.InternetDomainName.name (Showing top 12 results out of 315)

  • Common ways to obtain InternetDomainName
private void myMethod () {
InternetDomainName i =
  • Codota IconString domain;InternetDomainName.from(domain)
  • Codota IconPreconditions preconditions;Object reference;new InternetDomainName(preconditions.checkNotNull(reference))
  • Smart code suggestions by Codota
}
origin: stackoverflow.com

 final InternetDomainName topPrivateDomain = InternetDomainName.from(uriHost).topPrivateDomain();
topPrivateDomain.name();
origin: org.netpreserve.commons/commons-web

public static String hostToPublicSuffix(String host) {
  InternetDomainName idn;

  try {
    idn = InternetDomainName.fromLenient(host);
  } catch(IllegalArgumentException e) {
    return host;
  }
  InternetDomainName tmp = idn.publicSuffix();
  if(tmp == null) {
    return host;
  }
  String pubSuff = tmp.name();
  int idx = host.lastIndexOf(".", host.length() - (pubSuff.length()+2));
  if(idx == -1) {
    return host;
  }
  return host.substring(idx+1);
}

origin: jvelo/mayocat-shop

private String extractSlugFromHost(String host)
{
  String rootDomain;
  String siteName = siteSettings.getWebDomainName().or(siteSettings.getDomainName());
  if (Strings.emptyToNull(siteName) == null) {
    InternetDomainName domainName = InternetDomainName.from(host);
    if (domainName.hasPublicSuffix()) {
      // Domain is under a valid TLD, extract the TLD + first child
      rootDomain = domainName.topPrivateDomain().name();
    } else if (host.indexOf(".") > 0 && host.indexOf(".") < host.length()) {
      // Otherwise, best guess : strip everything before the first dot.
      rootDomain = host.substring(host.indexOf(".") + 1);
    } else {
      rootDomain = host;
    }
  } else {
    rootDomain = StringUtils.substringBefore(siteSettings.getDomainName(), ":");
  }
  if (host.indexOf("." + rootDomain) > 0) {
    return host.substring(0, host.indexOf("." + rootDomain));
  } else {
    return host;
  }
}
origin: jclouds/legacy-jclouds

  @Override
  @SuppressWarnings("unchecked")
  public <R extends HttpRequest> R bindToRequest(R request, Object payload) {
   checkNotNull(payload, "hostprefix");
   checkArgument(isValid(request.getEndpoint().getHost()), "this is only valid for hostnames: " + request);
   InternetDomainName name = from(request.getEndpoint().getHost()).child(payload.toString());
   return (R) request.toBuilder().endpoint(uriBuilder(request.getEndpoint()).host(name.name()).build()).build();
  }
}
origin: org.jclouds/jclouds-core

  @Override
  @SuppressWarnings("unchecked")
  public <R extends HttpRequest> R bindToRequest(R request, Object payload) {
   checkNotNull(payload, "hostprefix");
   checkArgument(isValid(request.getEndpoint().getHost()), "this is only valid for hostnames: " + request);
   InternetDomainName name = from(request.getEndpoint().getHost()).child(payload.toString());
   return (R) request.toBuilder().endpoint(uriBuilder(request.getEndpoint()).host(name.name()).build()).build();
  }
}
origin: org.hudsonci.lib.guava/guava

return new HostSpecifier(domain.name());
origin: org.kill-bill.billing/killbill-osgi-bundles-jruby

return new HostSpecifier(domain.name());
origin: com.atlassian.bundles/guava

return new HostSpecifier(domain.name());
origin: at.bestsolution.efxclipse.eclipse/com.google.guava

return new HostSpecifier(domain.name());
origin: com.ning.billing/killbill-osgi-bundles-jruby

return new HostSpecifier(domain.name());
origin: com.ning.billing/killbill-osgi-bundles-analytics

return new HostSpecifier(domain.name());
origin: org.sonatype.sisu/sisu-guava

return new HostSpecifier(domain.name());
com.google.common.netInternetDomainNamename

Javadoc

The full domain name, converted to lower case.

Popular methods of InternetDomainName

  • from
    Returns an instance of InternetDomainName after lenient validation. Specifically, validation against
  • toString
    Returns the domain name, normalized to all lower case.
  • hasPublicSuffix
    Indicates whether this domain name ends in a #isPublicSuffix(), including if it is a public suffix i
  • isValid
    Indicates whether the argument is a syntactically valid domain name using lenient validation. Specif
  • isUnderPublicSuffix
    Indicates whether this domain name ends in a #isPublicSuffix(), while not being a public suffix itse
  • isTopPrivateDomain
    Indicates whether this domain name is composed of exactly one subdomain component followed by a #isP
  • hasParent
    Indicates whether this domain is composed of two or more parts.
  • <init>
    Private constructor used to implement #ancestor(int). Argument parts are assumed to be valid, as the
  • ancestor
    Returns the ancestor of the current domain at the given number of levels "higher" (rightward) in the
  • validatePart
    Helper method for #validateSyntax(List). Validates that one part of a domain name is valid.
  • validateSyntax
    Validation method used by to ensure that the domain name is syntactically valid according to RFC 103
  • topPrivateDomain
    Returns the portion of this domain name that is one level beneath the public suffix. For example, fo
  • validateSyntax,
  • topPrivateDomain,
  • findPublicSuffix,
  • matchesWildcardPublicSuffix,
  • parts,
  • child,
  • hasRegistrySuffix,
  • isTopDomainUnderRegistrySuffix,
  • isUnderRegistrySuffix

Popular in Java

  • Finding current android device location
  • notifyDataSetChanged (ArrayAdapter)
  • setContentView (Activity)
  • getSharedPreferences (Context)
  • RandomAccessFile (java.io)
    Allows reading from and writing to a file in a random-access manner. This is different from the uni-
  • ConnectException (java.net)
    A ConnectException is thrown if a connection cannot be established to a remote host on a specific po
  • Date (java.sql)
    A class which can consume and produce dates in SQL Date format. Dates are represented in SQL as yyyy
  • PriorityQueue (java.util)
    An unbounded priority Queue based on a priority heap. The elements of the priority queue are ordered
  • Queue (java.util)
    A collection designed for holding elements prior to processing. Besides basic java.util.Collection o
  • Set (java.util)
    A collection that contains no duplicate elements. More formally, sets contain no pair of elements e1
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now