code: public static Properties loadProperties(File f) throws IOException {
          Properties props = new Properties();
          FileInputStream in = new FileInputStream(f);
          try {
              props.load(in);
              return props;
          } finally {
              try {
                  in.close();
              } catch (IOException e) {
              }
          }
      }
docs: Load properties from the given file.