protected int parseInt(String input) {
        int i;

        if (input == null) {
            i = FAILURE;
        } else {
            try {
                i = Integer.parseInt(input);
            } catch (NumberFormatException e) {
                i = FAILURE;
            }
        }

        return i;
    }