code: public static int parseInt(String s, int radix) {
          if (s == null || s.length() == 0 || s.trim().length() == 0) {
              throw new NumberFormatException("Null or empty string");
          }
          long result = parseLong(s, radix);
          if ((result & INT_MASK) != result) {
              throw new NumberFormatException("Input [" + s + "] in base [" + radix
                      + "] is not in the range of an unsigned integer");
          }
          return (int) result;
      }
docs: Returns the unsigned {@code int} value represented by a string with the
  given radix.
  
  @param s
  the string containing the unsigned integer representation to
  be parsed.
  @param radix
  the radix to use while parsing {@code s}; must be between
  {@link Character#MIN_RADIX} and {@link #MAX_RADIX}.
  @throws NumberFormatException
  if the string does not contain a valid unsigned {@code int},
  or if supplied radix is invalid.