Parses integer value out of a string.
If the string is invalid, it throws NumberFormatException,
so a calling method knows of that issue.
Parameters: value - String to be parsed Parameters: defaultValue - Default int value if value==null Parsed int value. throws: NumberFormatException - If value is not valid number.