package com.bifan.txtreaderlib.utils;

import java.io.IOException;
import java.io.InputStream;
import java.util.Properties;

public class ConfigUtils {
    private static final String CONFIG_FILE = "config.properties";

    public static String getAuthKey() {
        try {
            Properties properties = new Properties();
            InputStream inputStream = ConfigUtils.class.getClassLoader().getResourceAsStream(CONFIG_FILE);
            properties.load(inputStream);
            return properties.getProperty("auth_key");
        } catch (IOException e) {
            e.printStackTrace();
            return null;
        }
    }
}