Home | History | Annotate | Download | only in util

Lines Matching defs:host

67      * @param host A string representing the host following the '@' symbol
69 public EmailAddress(final String user, final String host) {
70 this(user, host, false);
77 * @param host A string representing the host following the '@' symbol
80 public EmailAddress(final String user, final String host, final boolean i18n) {
83 setHost(host);
97 (atIndex == (emailString.length() - 1))) { // last character, no host
102 host = emailString.substring(atIndex + 1);
109 return user + "@" + host;
118 if ((user == null) || (host == null)) {
122 if ((user.length() == 0) || (host.length() == 0)) {
126 // check for white space in the host
127 if (ANY_WHITESPACE.indexIn(host) >= 0) {
131 // ensure the host is above the minimum length
132 if (host.length() < 4) {
136 final int firstDot = host.indexOf('.');
138 // ensure host contains at least one dot
143 // check if the host contains two continuous dots.
144 if (host.indexOf("..") >= 0) {
148 // check if the first host char is a dot.
149 if (host.charAt(0) == '.') {
153 final int secondDot = host.indexOf(".", firstDot + 1);
156 if (host.charAt(host.length() - 1) == '.' && secondDot == -1) {
160 // Host must not have any disallowed characters; allowI18n dictates whether
161 // host must be ASCII.
162 if (!EMAIL_ALLOWED_CHARS.matchesAllOf(host)
163 || (!allowI18n && !CharMatcher.ASCII.matchesAllOf(host))) {
236 // Arbitrary hash code as a function of both host and user.
250 return host;
253 // used to change the host on an email address and rechecks validity
256 * Changes the host name of the email address and rechecks the address'
258 * hash-keyed collections. Calling setHost() with a different host name will
261 * @param hostName The new host name of the email address.
264 host = hostName;
270 protected String host = null;