()
| 91 | abstract int readCharacter() throws IOException; |
| 92 | |
| 93 | char readUtf16() throws IOException { |
| 94 | char c = 0; |
| 95 | for (int i = 0; i < 4; ++i) { |
| 96 | int digit = Character.digit((char)readCharacter(), 16); |
| 97 | if (digit == -1) throw new IOException("Invalid Unicode escape encountered."); |
| 98 | c <<= 4; |
| 99 | c |= digit; |
| 100 | } |
| 101 | return c; |
| 102 | } |
| 103 | |
| 104 | void parse(Map map) |
| 105 | throws IOException |
no test coverage detected