// Path: src/main/java/com/yiji/falcon/agent/util/StringUtils.java
// public class StringUtils {
// 
//     /**
//      * 判断传入的String是否为空('' or null)
//      * @param str
//      * @return
//      */
//     public static boolean isEmpty(String str){
//         return str == null || str.length() == 0;
//     }
// 
//     /**
//      * 返回指定数字的字符串形式
//      * @param value
//      * @return
//      */
//     public static String getStringByInt(int value){
//         return String.valueOf(value).intern();
//     }
// 
// }


import com.yiji.falcon.agent.util.StringUtils;
import lombok.Getter;
import java.io.FileInputStream;
import java.io.IOException;
import java.util.Properties;

    private String agentHomeDir;


    private static final String CONF_AGENT_ENDPOINT = "agent.endpoint";
    private static final String CONF_AGENT_HOME = "agent.home.dir";
    private static final String CONF_AGENT_FLUSH_TIME = "agent.flush.time";
    private static final String CONF_AGENT_MAX_THREAD = "agent.thread.maxCount";

    private static final String CONF_AGENT_FALCON_PUSH_URL = "agent.falcon.push.url";
    private static final String CONF_AGENT_PORT = "agent.port";
    private static final String CONF_AGENT_WEB_PORT = "agent.web.port";
    private static final String CONF_AGENT_WEB_ENABLE = "agent.web.enable";
    private static final String CONF_AGENT_MOCK_VALID_TIME = "agent.mock.valid.time";
    private static final String AUTHORIZATION_CONF_PATH = "authorization.conf.path";
    private static final String FALCON_DIR_PATH = "agent.falcon.dir";
    private static final String FALCON_CONF_DIR_PATH = "agent.falcon.conf.dir";
    private static final String CONF_AGENT_JMX_LOCAL_CONNECT = "agent.jmx.localConnectSupport";
    private static final String CONF_AGENT_UPDATE_URL = "agent.update.pack.url";

    private Properties agentConf = null;

    /**
     * 初始化agent配置
     */
    AgentConfiguration() {
        instance();
    }

    private void instance(){
// Path: src/main/java/com/yiji/falcon/agent/util/StringUtils.java
// public class StringUtils {
// 
//     /**
//      * 判断传入的String是否为空('' or null)
//      * @param str
//      * @return
//      */
//     public static boolean isEmpty(String str){
//         return str == null || str.length() == 0;
//     }
// 
//     /**
//      * 返回指定数字的字符串形式
//      * @param value
//      * @return
//      */
//     public static String getStringByInt(int value){
//         return String.valueOf(value).intern();
//     }
// 
// }


// Path: src/main/java/com/yiji/falcon/agent/config/AgentConfiguration.java
import com.yiji.falcon.agent.util.StringUtils;
import lombok.Getter;
import java.io.FileInputStream;
import java.io.IOException;
import java.util.Properties;


    private String agentHomeDir;


    private static final String CONF_AGENT_ENDPOINT = "agent.endpoint";
    private static final String CONF_AGENT_HOME = "agent.home.dir";
    private static final String CONF_AGENT_FLUSH_TIME = "agent.flush.time";
    private static final String CONF_AGENT_MAX_THREAD = "agent.thread.maxCount";

    private static final String CONF_AGENT_FALCON_PUSH_URL = "agent.falcon.push.url";
    private static final String CONF_AGENT_PORT = "agent.port";
    private static final String CONF_AGENT_WEB_PORT = "agent.web.port";
    private static final String CONF_AGENT_WEB_ENABLE = "agent.web.enable";
    private static final String CONF_AGENT_MOCK_VALID_TIME = "agent.mock.valid.time";
    private static final String AUTHORIZATION_CONF_PATH = "authorization.conf.path";
    private static final String FALCON_DIR_PATH = "agent.falcon.dir";
    private static final String FALCON_CONF_DIR_PATH = "agent.falcon.conf.dir";
    private static final String CONF_AGENT_JMX_LOCAL_CONNECT = "agent.jmx.localConnectSupport";
    private static final String CONF_AGENT_UPDATE_URL = "agent.update.pack.url";

    private Properties agentConf = null;

    /**
     * 初始化agent配置
     */
    AgentConfiguration() {
        instance();
    }

    private void instance(){
        if(StringUtils.isEmpty(System.getProperty("agent.conf.path"))){