标签:stream str 读取 col valueof 获取 自动化 nts string
一、Properties
1.读取properties文件
Properties properties = new Properties(); properties.load(new FileInputStream(propertyFileName));
2.读取.properties文件数据数据
Configuration config = config = new PropertiesConfiguration(); String.valueOf(config.getProperty(key));
3.获取Name
Enumeration<?> en = properties.propertyNames while (en.hasMoreElements()) { String key = (String) en.nextElement(); if (key.toLowerCase().equals(RETRYCOUNT)) { sRetryCount = properties.getProperty(key); } if (key.toLowerCase().equals(SOURCEDIR)) { sourceCodeDir = properties.getProperty(key); } if (key.toLowerCase().equals(SOURCEENCODING)) { sourceCodeEncoding = properties.getProperty(key); }
标签:stream str 读取 col valueof 获取 自动化 nts string
原文地址:http://www.cnblogs.com/liu-Gray/p/7800799.html