MCPcopy Create free account
hub / github.com/apache/solr / readStringChars

Method readStringChars

solr/solrj/src/java/org/noggit/JSONParser.java:705–727  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

703 private final CharArr tmp = new CharArr(null, 0, 0);
704
705 private CharArr readStringChars() throws IOException {
706 if (stringTerm == 0) {
707 // "out" will already contain the first part of the bare string, so don't reset it
708 readStringBare(out);
709 return out;
710 }
711
712 char terminator = (char) stringTerm;
713 int i;
714 for (i = start; i < end; i++) {
715 char c = buf[i];
716 if (c == terminator) {
717 tmp.set(buf, start, i); // directly use input buffer
718 start = i + 1; // advance past last '"'
719 return tmp;
720 } else if (c == '\\') {
721 break;
722 }
723 }
724 out.reset();
725 readStringChars2(out, i);
726 return out;
727 }
728
729 // middle is the pointer to the middle of a buffer to start scanning for a non-string
730 // character ('"' or "/"). start<=middle<end

Callers 1

getStringCharsMethod · 0.95

Calls 4

readStringBareMethod · 0.95
readStringChars2Method · 0.95
setMethod · 0.65
resetMethod · 0.65

Tested by

no test coverage detected