code: public static short parseShort(String s, int radix)
          throws NumberFormatException {
          int i = Integer.parseInt(s, radix);
          if (i < MIN_VALUE || i > MAX_VALUE)
              throw new NumberFormatException(
                  "Value out of range. Value:\"" + s + "\" Radix:" + radix);
          return (short)i;
      }
docs: Parses the string argument as a signed {@code 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 {@link java.lang.Character#digit(char,
  int)} returns a nonnegative value) except that the first
  character may be an ASCII minus sign {@code '-'}
  ({@code '\u005Cu002D'}) to indicate a negative value or an
  ASCII plus sign {@code '+'} ({@code '\u005Cu002B'}) to
  indicate a positive value.  The resulting {@code short} value
  is returned.
  
  <p>An exception of type {@code NumberFormatException} is
  thrown if any of the following situations occurs:
  <ul>
  <li> The first argument is {@code null} or is a string of
  length zero.
  
  <li> The radix is either smaller than {@link
  java.lang.Character#MIN_RADIX} or larger than {@link
  java.lang.Character#MAX_RADIX}.
  
  <li> Any character of the string is not a digit of the
  specified radix, except that the first character may be a minus
  sign {@code '-'} ({@code '\u005Cu002D'}) or plus sign
  {@code '+'} ({@code '\u005Cu002B'}) provided that the
  string is longer than length 1.
  
  <li> The value represented by the string is not a value of type
  {@code short}.
  </ul>
  
  @param s         the {@code String} containing the
  {@code short} representation to be parsed
  @param radix     the radix to be used while parsing {@code s}
  @return          the {@code short} represented by the string
  argument in the specified radix.
  @throws          NumberFormatException If the {@code String}
  does not contain a parsable {@code short}.