MCPcopy Create free account
hub / github.com/M66B/FairEmail / readNumber

Method readNumber

app/src/main/java/com/sun/mail/iap/Response.java:336–351  ·  view source on GitHub ↗

Extract an integer, starting at the current position. Updates the internal index to beyond the number. Returns -1 if a number was not found. @return a number

()

Source from the content-addressed store, hash-verified

334 * @return a number
335 */
336 public int readNumber() {
337 // Skip leading spaces
338 skipSpaces();
339
340 int start = index;
341 while (index < size && Character.isDigit((char)buffer[index]))
342 index++;
343
344 if (index > start) {
345 try {
346 return ASCIIUtility.parseInt(buffer, start, index);
347 } catch (NumberFormatException nex) { }
348 }
349
350 return -1;
351 }
352
353 /**
354 * Extract a long number, starting at the current position. Updates the

Callers 9

doCommandMethod · 0.80
searchMethod · 0.80
BODYMethod · 0.80
BODYSTRUCTUREMethod · 0.80
parseBodyExtensionMethod · 0.80
issueSearchMethod · 0.80
sortMethod · 0.80
StatusMethod · 0.80
MailboxInfoMethod · 0.80

Calls 2

skipSpacesMethod · 0.95
parseIntMethod · 0.95

Tested by

no test coverage detected