public static int parseInt(String string, int radix, int defaultValue) {
        int result = defaultValue;

        if (TextUtils.isEmpty(string)) {
            return result;
        }

        try {
            result = Integer.parseInt(string, radix);
        } catch (Exception e) {
            // parse error
        }
        return result;
    }
Parse a string to a integer value with a radix. If the string is not a integer value, this
will return the default value.

@param string The string value.
@param radix The radix to be used.
@param defaultValue The default integer value.
@return The integer value.
netbare-core/src/main/java/com/github/megatronking/netbare/NetBareUtils.java