protected boolean isTokenChar(char ch){
  if (Character.isLetterOrDigit(ch))   return true;
  if (Character.isISOControl(ch))   return false;
  if (isHttpSeparator(ch))   return false;
  return true;
}

protected boolean isTokenChar ( char ch ) { if ( Character . isLetterOrDigit ( ch ) ) return true ; if ( Character . isISOControl ( ch ) ) return false ; if ( isHttpSeparator ( ch ) ) return false ; return true ; }
checks whether a character is a valid token character . whitespace , control characters , and http separators are not valid token characters . the http specification ( rfc 2616 , section 2 . 2 ) defines tokens only for the us - ascii character set , this method extends the definition to other character sets .
