Esempio n. 1
0
 /**
  * Used to update the preferences with possibly new values from the root document. This method is
  * only used within this class to prevent recursion from creating a <code>Logger</code> instance.
  *
  * @see java.util.logging.Logger
  */
 private static void silentUpdate() {
   try {
     // Record all of the preferences in the odin.prefs.xml file
     prefsOdin.exportNode(new FileOutputStream(sPrefsPath));
   } catch (Exception x) {
     // If an error was encountered during the update then write the details
     // to the System.err as there isn't a log to use.
     System.err.println(
         "Couldn't update the preferences with values from the server's root document.");
     x.printStackTrace();
   }
 }
Esempio n. 2
0
 /** Used to update any changes within the preferences to the main XML file. */
 public static void updateOdinPrefs() {
   // Obtain a logger to write progress to
   Logger log = LoggerFactory.getLogger("odin.odin.object.OdinPreferences");
   try {
     log.finest("Exporting preferences to file: " + sPrefsPath);
     // Record all of the preferences in the odin.prefs.xml file
     prefsOdin.exportNode(new FileOutputStream(sPrefsPath));
   } catch (Exception x) {
     // If an error was encountered during the update then write the details to the log
     log.throwing("OdinPreferences", "updateOdinPrefs()", x);
   }
 }