Beispiel #1
0
 static synchronized void setprefb(String prefname, byte[] val) {
   try {
     if (prefs == null) prefs = Preferences.userNodeForPackage(Utils.class);
     prefs.putByteArray(prefname, val);
   } catch (SecurityException e) {
   }
 }
Beispiel #2
0
 static synchronized byte[] getprefb(String prefname, byte[] def) {
   try {
     if (prefs == null) prefs = Preferences.userNodeForPackage(Utils.class);
     return (prefs.getByteArray(prefname, def));
   } catch (SecurityException e) {
     return (def);
   }
 }
Beispiel #3
0
 static synchronized String getpref(String prefname, String def) {
   try {
     if (prefs == null) prefs = Preferences.userNodeForPackage(Utils.class);
     return (prefs.get(prefname, def));
   } catch (SecurityException e) {
     return (def);
   }
 }