首页 > 系统 > Android > 正文

Android中直接按路径读取properties文件

2019-11-06 09:52:57
字体:
来源:转载
供稿:网友
static { try { /** * 从配置文件中读取数据 使用java方式读取 */ PRoperties pro = new Properties(); pro.load(FileLoader.class.getResourceAsStream("/assets/ipConfig.properties")); url = pro.getProperty("wcfHttpsAddress"); httpType = Integer.parseInt(pro.getProperty("httpType")); } catch (Exception e) { Log.e("读取资源文件异常",e.toString()); } }
发表评论 共有条评论
用户名: 密码:
验证码: 匿名发表