1 19 20 package com.sslexplorer.boot; 21 22 import java.io.File ; 23 import java.util.prefs.Preferences ; 24 import java.util.prefs.PreferencesFactory ; 25 26 public class PropertyPreferencesFactory implements PreferencesFactory { 27 28 private Preferences systemPreferences, userPreferences; 29 30 public Preferences systemRoot() { 31 if(systemPreferences == null) { 32 systemPreferences = PropertyPreferences.SYSTEM_ROOT; 33 } 34 return systemPreferences; 35 } 36 37 public Preferences userRoot() { 38 if(userPreferences == null) { 39 userPreferences = PropertyPreferences.USER_ROOT; 40 } 41 return userPreferences; 42 } 43 44 } 45 | Popular Tags |