private BencodeInteger getIntegerValue(String stringValue) throws InvalidFormatException {
        try {
            Integer result = Integer.valueOf(stringValue);
            return new BencodeInteger(result);
        } catch (NumberFormatException e) {
            throw new InvalidFormatException();
        }
    }