public String getMainTld() {
        if (parsedMainTld) {
            return mainTld;
        }
        String host = getHost();
        if (host == null) return null;

        int lastDotPos = host.lastIndexOf(".");

        String mainTld;
        if (lastDotPos < 0) {
            //no ".", no TLD
            mainTld = null;
        } else if (lastDotPos == host.length() - 1) {
            //the "." is the last character
            mainTld = null;
        } else {
            //for www.yahoo.co.uk return uk
            //TODO: Implement list of TLDs from config?
            mainTld = host.substring(lastDotPos + 1);
        }
        this.parsedMainTld = true;
        this.mainTld = mainTld;
        return mainTld;
    }
Returns the <i>rest</i> of this uri, that is what is following the host or port.
This is path, query and fragment as defined in RFC 2396. Returns an empty string
if this uri has no rest.
vespajlib/src/main/java/com/yahoo/net/URI.java