Пример #1
0
 /**
  * Generate QuestPreferences from a config file
  *
  * @param configFileName - the path to the config file
  * @return the read QuestPreferences object
  * @throws FileNotFoundException
  * @throws IOException
  */
 private QuestPreferences getPreferencesFromFile(String configFileName)
     throws FileNotFoundException, IOException {
   QuestPreferences pref = new QuestPreferences();
   if (!configFileName.isEmpty()) {
     File configFile = new File(URI.create(configFileName));
     pref.readDefaultPropertiesFile(new FileInputStream(configFile));
   } else {
     pref.readDefaultPropertiesFile();
   }
   return pref;
 }