加载属性资源文件

来源:互联网 发布:淘宝上好吃不贵的零食 编辑:程序博客网 时间:2024/05/17 07:17

this.filePath = filePath;
  File file = new File(filePath);
  FileInputStream inStream = new FileInputStream(file);
  try {
   Properties objProperties;= new Properties();
   objProperties.load(inStream);
  } catch (FileNotFoundException e) {
   e.printStackTrace();
  } catch (Exception e) {
   e.printStackTrace();
  } finally {
   inStream.close();
  }

 

objProperties.getProperty(key)

原创粉丝点击