private boolean isDomain(String domain){
  if (domain == null)   return true;
  final int len=domain.length();
  int next=0;
  while (next < len) {
    final char c=domain.charAt(next++);
switch (c) {
case ':':
case '\n':
      return false;
case '*':
case '?':
    _domain_pattern=true;
  break;
}
}
return true;
}

private boolean isDomain ( String domain ) { if ( domain == null ) return true ; final int len = domain . length ( ) ; int next = 0 ; while ( next < len ) { final char c = domain . charAt ( next ++ ) ; switch ( c ) { case ':' : case '\n' : return false ; case '*' : case '?' : _domain_pattern = true ; break ; } } return true ; }
check if domain is a valid domain . set _domain_pattern if appropriate .
