| 356 | } |
| 357 | |
| 358 | static private int readUnicodeChar(String token, int offset, int length, int base) { |
| 359 | if(token.length() != offset + length) |
| 360 | throw new IllegalArgumentException("Invalid unicode character: \\" + token); |
| 361 | int uc = 0; |
| 362 | for(int i = offset; i < offset + length; ++i) |
| 363 | { |
| 364 | int d = Character.digit(token.charAt(i), base); |
| 365 | if(d == -1) |
| 366 | throw new IllegalArgumentException("Invalid digit: " + token.charAt(i)); |
| 367 | uc = uc * base + d; |
| 368 | } |
| 369 | return (char) uc; |
| 370 | } |
| 371 | |
| 372 | static private int readUnicodeChar(PushbackReader r, int initch, int base, int length, boolean exact) { |
| 373 | int uc = Character.digit(initch, base); |