/** * Advances the pointer through the exponent. */ public void parseExponent() { // get past E pos++; if (check('-') || check('+')) { pos++; } outer: while (pos < s.length()) { switch (s.charAt(pos)) { case '0': case '1': case '2': case '3': case '4': case '5': case '6': case '7': case '8': case '9': pos++; break; default: break outer; } } }
/** * Read the current character, making sure that it is the expected character. Advances the pointer to the next character. * * @param ch the character expected * @throws JSONParseException if the current character does not match the given character */ public void read(final char ch) { if (!check(ch)) { throw new JSONParseException(s, pos); } pos++; }
/** * Advances the pointer through the exponent. */ public void parseExponent() { // get past E pos++; if (check('-') || check('+')) { pos++; } outer: while (pos < s.length()) { switch (s.charAt(pos)) { case '0': case '1': case '2': case '3': case '4': case '5': case '6': case '7': case '8': case '9': pos++; break; default: break outer; } } }
/** * Read the current character, making sure that it is the expected character. Advances the pointer to the next character. * * @param ch the character expected * @throws JSONParseException if the current character does not match the given character */ public void read(final char ch) { if (!check(ch)) { throw new JSONParseException(s, pos); } pos++; }