コード例 #1
0
ファイル: FILE.java プロジェクト: cowsandmilk/MoleculeViewer
  /** Convenience method to load a properties file. */
  public static Properties loadProperties(String resource) {
    Properties properties = new Properties();

    FILE propertyStream = open(resource);

    if (debug) {
      System.out.println("loadProperties from " + propertyStream);
    }

    if (propertyStream != null) {
      try {
        properties.load(propertyStream);
      } catch (IOException e) {
        e.printStackTrace();
      } finally {
        propertyStream.close();
      }
    }

    return properties;
  }