public long getLong(String key, long defaultValue) {
        if (key == null) {
            throw new IllegalArgumentException("key is null");
        }

        if (properties == null) {
            return defaultValue;
        }
        String value = properties.getProperty(key);
        try {
            return Long.parseLong(value);
        } catch (Exception e) {
            return defaultValue;
        }
    }