public static short parseShort (String s, int radix) throws NumberFormatException

Parses the string argument as a signed short in the radix specified by the second argument. The characters in the string must all be digits, of the specified radix (as determined by whether java.lang.Character.digit(char, int) returns a nonnegative value) except that the first character may be an ASCII minus sign '-' ( '\u002D') to indicate a negative value or an ASCII plus sign '+' ( '\u002B') to indicate a positive value. The resulting short value is returned.

An exception of type NumberFormatException is thrown if any of the following situations occurs:

Parameters:
s    the String containing the short representation to be parsed
radix    the radix to be used while parsing s

Returns:  the short represented by the string argument in the specified radix.

Exceptions:
NumberFormatException    If the String does not contain a parsable short.