(CharArr arr, int lim)
| 589 | |
| 590 | // call after 'e' or 'E' has been seen to read the rest of the exponent |
| 591 | private int readExp(CharArr arr, int lim) throws IOException { |
| 592 | nstate |= HAS_EXPONENT; |
| 593 | int ch = getChar(); |
| 594 | lim--; |
| 595 | |
| 596 | if (ch == '+' || ch == '-') { |
| 597 | arr.write(ch); |
| 598 | ch = getChar(); |
| 599 | lim--; |
| 600 | } |
| 601 | |
| 602 | // make sure at least one digit is read. |
| 603 | if (ch < '0' || ch > '9') { |
| 604 | throw err("missing exponent number"); |
| 605 | } |
| 606 | arr.write(ch); |
| 607 | |
| 608 | return readExpDigits(arr, lim); |
| 609 | } |
| 610 | |
| 611 | // continuation of readExpStart |
| 612 | private int readExpDigits(CharArr arr, int lim) throws IOException { |
no test coverage detected