private static int parseInt(final String str) throws BOSHException {
        try {
            return Integer.parseInt(str);
        } catch (NumberFormatException nfx) {
            throw(new BOSHException(
                    "Could not parse an integer from the value provided: "
                    + str,
                    nfx));
        }
    }