private void checkToken(String token){
  for (int i=0; i < token.length(); i++) {
    char ch=token.charAt(i);
    if (!TOKEN.get(ch)) {
      throw new IllegalArgumentException("Invalid token character '" + ch + "' in token \""+ token+ "\"");
    }
  }
}

private void checkToken ( String token ) { for ( int i = 0 ; i < token . length ( ) ; i ++ ) { char ch = token . charAt ( i ) ; if ( ! TOKEN . get ( ch ) ) { throw new IllegalArgumentException ( "Invalid token character '" + ch + "' in token \"" + token + "\"" ) ; } } }
checks the given token string for illegal characters , as defined in rfc 2616 , section 2 . 2 .
