Returns the characters of a JSON numeric value. The underlying buffer of the returned CharArr should not be modified as it may be shared with the input buffer. The returned CharArr will only be valid up until the next JSONParser method is called. Any required data s
()
| 1219 | * called. Any required data should be read before that point. |
| 1220 | */ |
| 1221 | public CharArr getNumberChars() throws IOException { |
| 1222 | int ev = 0; |
| 1223 | if (valstate == 0) ev = nextEvent(); |
| 1224 | |
| 1225 | if (valstate == LONG || valstate == NUMBER) { |
| 1226 | valstate = 0; |
| 1227 | return out; |
| 1228 | } else if (valstate == BIGNUMBER) { |
| 1229 | continueNumber(out); |
| 1230 | valstate = 0; |
| 1231 | return out; |
| 1232 | } else { |
| 1233 | throw err("Unexpected " + ev); |
| 1234 | } |
| 1235 | } |
| 1236 | |
| 1237 | /** Reads a JSON numeric value into the output. */ |
| 1238 | public void getNumberChars(CharArr output) throws IOException { |