private void readEnd() throws ParseException { while (upto < input.length()) { char ch = input.charAt(upto); if (isJSONWhitespace(ch) == false) { throw newParseException("unexpected character '" + ch + "' after end of GeoJSON object"); } upto++; } }
private char peek() throws ParseException { while (upto < input.length()) { char ch = input.charAt(upto); if (isJSONWhitespace(ch)) { upto++; continue; } return ch; } throw newParseException("unexpected EOF"); }
/** Scans across whitespace and consumes the expected character, or throws {@code ParseException} if the character is wrong */ private void scan(char expected) throws ParseException { while (upto < input.length()) { char ch = input.charAt(upto); if (isJSONWhitespace(ch)) { upto++; continue; } if (ch != expected) { throw newParseException("expected '" + expected + "' but got '" + ch + "'"); } upto++; return; } throw newParseException("expected '" + expected + "' but got EOF"); }
private void readEnd() throws ParseException { while (upto < input.length()) { char ch = input.charAt(upto); if (isJSONWhitespace(ch) == false) { throw newParseException("unexpected character '" + ch + "' after end of GeoJSON object"); } upto++; } }
private char peek() throws ParseException { while (upto < input.length()) { char ch = input.charAt(upto); if (isJSONWhitespace(ch)) { upto++; continue; } return ch; } throw newParseException("unexpected EOF"); }
/** Scans across whitespace and consumes the expected character, or throws {@code ParseException} if the character is wrong */ private void scan(char expected) throws ParseException { while (upto < input.length()) { char ch = input.charAt(upto); if (isJSONWhitespace(ch)) { upto++; continue; } if (ch != expected) { throw newParseException("expected '" + expected + "' but got '" + ch + "'"); } upto++; return; } throw newParseException("expected '" + expected + "' but got EOF"); }