code: public static boolean isToken(String str) {
  		// token := 1*<any (US-ASCII) CHAR except SPACE, CTLs, or tspecials>
  		// tspecials := "(" / ")" / "<" / ">" / "@" / "," / ";" / ":" / "\" /
  		// <"> / "/" / "[" / "]" / "?" / "="
  		// CTL := 0.- 31., 127.
  
  		final int length = str.length();
  		if (length == 0)
  			return false;
  
  		for (int idx = 0; idx < length; idx++) {
  			char ch = str.charAt(idx);
  			if (!TOKEN_CHARS.get(ch))
  				return false;
  		}
  
  		return true;
  	}
docs: Tests whether the specified string is a token as defined in RFC 2045
  section 5.1.
  
  @param str
  string to test.
  @return <code>true</code> if the specified string is a RFC 2045 token,
  <code>false</code> otherwise.