MCPcopy Create free account
hub / github.com/codenameone/CodenameOne / parseIntOption

Method parseIntOption

vm/JavaAPI/src/java/net/URI.java:562–568  ·  view source on GitHub ↗

Internal utility method to throw a syntax error if a value can not be parsed. @param key name of the value being parsed, for error reporting. @param value value to be parsed. @return parsed integer. @throws URISyntaxException if value can not be parsed.

(String key, String value)

Source from the content-addressed store, hash-verified

560 * @throws URISyntaxException if value can not be parsed.
561 */
562 int parseIntOption(String key, String value) throws URISyntaxException {
563 try {
564 return Integer.parseInt(value);
565 } catch (NumberFormatException nfe) {
566 throw new URISyntaxException(value, "Invalid " + key + " value: " + value);
567 }
568 }
569
570 /**
571 * Internal utility method to determine if the given scheme should use

Callers 1

setAuthorityMethod · 0.95

Calls 1

parseIntMethod · 0.95

Tested by

no test coverage detected