static synchronized void setprefb(String prefname, byte[] val) { try { if (prefs == null) prefs = Preferences.userNodeForPackage(Utils.class); prefs.putByteArray(prefname, val); } catch (SecurityException e) { } }
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); } }
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); } }