code: private String nextLiteral(boolean assignOffsetsOnly) throws IOException {
          StringBuilder builder = null;
          valuePos = -1;
          valueLength = 0;
          int i = 0;
  
          findNonLiteralCharacter:
          while (true) {
              for (; pos + i < limit; i++) {
                  switch (buffer[pos + i]) {
                      case '/':
                      case '\\':
                      case ';':
                      case '#':
                      case '=':
                          checkLenient(); // fall-through
                      case '{':
                      case '}':
                      case '[':
                      case ']':
                      case ':':
                      case ',':
                      case ' ':
                      case '\t':
                      case '\f':
                      case '\r':
                      case '\n':
                          break findNonLiteralCharacter;
                  }
              }
  
              /*
               * Attempt to load the entire literal into the buffer at once. If
               * we run out of input, add a non-literal character at the end so
               * that decoding doesn't need to do bounds checks.
               */
              if (i < buffer.length) {
                  if (fillBuffer(i + 1)) {
                      continue;
                  } else {
                      buffer[limit] = '\0';
                      break;
                  }
              }
  
              // use a StringBuilder when the value is too long. It must be an unquoted string.
              if (builder == null) {
                  builder = new StringBuilder();
              }
              builder.append(buffer, pos, i);
              valueLength += i;
              pos += i;
              i = 0;
              if (!fillBuffer(1)) {
                  break;
              }
          }
  
          String result;
          if (assignOffsetsOnly && builder == null) {
              valuePos = pos;
              result = null;
          } else if (skipping) {
              result = "skipped!";
          } else if (builder == null) {
              result = stringPool.get(buffer, pos, i);
          } else {
              builder.append(buffer, pos, i);
              result = builder.toString();
          }
          valueLength += i;
          pos += i;
          return result;
      }
docs: Reads the value up to but not including any delimiter characters. This
  does not consume the delimiter character.
  
  @param assignOffsetsOnly true for this method to only set the valuePos
  and valueLength fields and return a null result. This only works if
  the literal is short; a string is returned otherwise.