ConfigureFileParse.java package com.cstor.ctape.tools;import java.io.BufferedInputStream;import java.io.FileInputStream;import java.io.IOException;import java.io.InputStream;import java.util.Properties;public class ConfigureFileParse {/*** 根
package com.cstor.ctape.tools; import java.io.BufferedInputStream; import java.io.FileInputStream; import java.io.IOException; import java.io.InputStream; import java.util.Properties; public class ConfigureFileParse { /** * 根据键读取系统配置文件中对于的值 * @param key * @return String * @throws */ public static String readValue(String key) { String filePath = Constant.ConfigureFilePath; Properties props = new Properties(); InputStream in = null; String value = null; try { in = new BufferedInputStream(new FileInputStream(filePath)); props.load(in); value = props.getProperty(key); } catch (Exception e) { } finally { try { if (in != null) { in.close(); } } catch (IOException e1) { } } return value; } }