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

Method getNumberChars

solr/solrj/src/java/org/noggit/JSONParser.java:1221–1235  ·  view source on GitHub ↗

Returns the characters of a JSON numeric value. The underlying buffer of the returned CharArr should not be modified as it may be shared with the input buffer. The returned CharArr will only be valid up until the next JSONParser method is called. Any required data s

()

Source from the content-addressed store, hash-verified

1219 * called. Any required data should be read before that point.
1220 */
1221 public CharArr getNumberChars() throws IOException {
1222 int ev = 0;
1223 if (valstate == 0) ev = nextEvent();
1224
1225 if (valstate == LONG || valstate == NUMBER) {
1226 valstate = 0;
1227 return out;
1228 } else if (valstate == BIGNUMBER) {
1229 continueNumber(out);
1230 valstate = 0;
1231 return out;
1232 } else {
1233 throw err("Unexpected " + ev);
1234 }
1235 }
1236
1237 /** Reads a JSON numeric value into the output. */
1238 public void getNumberChars(CharArr output) throws IOException {

Callers 10

testCorruptionMethod · 0.95
testNumbersMethod · 0.95
getDoubleMethod · 0.95
getStringMethod · 0.80
parseAddMethod · 0.80
parseFieldValueMethod · 0.80
parseMethod · 0.80
getNumberMethod · 0.80
getBigNumberMethod · 0.80
parseSingleFieldValueMethod · 0.80

Calls 4

nextEventMethod · 0.95
continueNumberMethod · 0.95
errMethod · 0.95
writeMethod · 0.65

Tested by 3

testCorruptionMethod · 0.76
testNumbersMethod · 0.76
parseMethod · 0.64