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)
| 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 |