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

Method readExp

solr/solrj/src/java/org/noggit/JSONParser.java:591–609  ·  view source on GitHub ↗
(CharArr arr, int lim)

Source from the content-addressed store, hash-verified

589
590 // call after 'e' or 'E' has been seen to read the rest of the exponent
591 private int readExp(CharArr arr, int lim) throws IOException {
592 nstate |= HAS_EXPONENT;
593 int ch = getChar();
594 lim--;
595
596 if (ch == '+' || ch == '-') {
597 arr.write(ch);
598 ch = getChar();
599 lim--;
600 }
601
602 // make sure at least one digit is read.
603 if (ch < '0' || ch > '9') {
604 throw err("missing exponent number");
605 }
606 arr.write(ch);
607
608 return readExpDigits(arr, lim);
609 }
610
611 // continuation of readExpStart
612 private int readExpDigits(CharArr arr, int lim) throws IOException {

Callers 3

readNumberMethod · 0.95
readFracMethod · 0.95
continueNumberMethod · 0.95

Calls 4

getCharMethod · 0.95
errMethod · 0.95
readExpDigitsMethod · 0.95
writeMethod · 0.65

Tested by

no test coverage detected