private int read() { try { if (readBegin == readEnd) { // need to fill the buffer int len = fillBuf(); if (len == -1) { return -1; } assert len != 0; readBegin = storeEnd; readEnd = readBegin + len; } return buf[readBegin++]; } catch (IOException ioe) { throw new JsonException(JsonMessages.TOKENIZER_IO_ERR(), ioe); } }
private JsonParsingException expectedChar(int unexpected, char expected) { JsonLocation location = getLastCharLocation(); return new JsonParsingException( JsonMessages.TOKENIZER_EXPECTED_CHAR(unexpected, location, expected), location); }
private JsonParsingException unexpectedChar(int ch) { JsonLocation location = getLastCharLocation(); return new JsonParsingException(JsonMessages.TOKENIZER_UNEXPECTED_CHAR(ch, location), location); }