Beispiel #1
0
 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);
   }
 }
Beispiel #2
0
 private JsonParsingException expectedChar(int unexpected, char expected) {
   JsonLocation location = getLastCharLocation();
   return new JsonParsingException(
       JsonMessages.TOKENIZER_EXPECTED_CHAR(unexpected, location, expected), location);
 }
Beispiel #3
0
 private JsonParsingException unexpectedChar(int ch) {
   JsonLocation location = getLastCharLocation();
   return new JsonParsingException(JsonMessages.TOKENIZER_UNEXPECTED_CHAR(ch, location), location);
 }