Checks if the given character is a valid HTTP token character as per RFC 7230. @param c the character to check @return true if the character is a valid token character
(int c)
| 277 | * @return {@code true} if the character is a valid token character |
| 278 | */ |
| 279 | public static boolean isToken(int c) { |
| 280 | // Fast for correct values, slower for incorrect ones |
| 281 | try { |
| 282 | return IS_TOKEN[c]; |
| 283 | } catch (ArrayIndexOutOfBoundsException ex) { |
| 284 | return false; |
| 285 | } |
| 286 | } |
| 287 | |
| 288 | |
| 289 | /** |