public byte[] load_licence(Options option) { /* Preferences prefs = Preferences.userNodeForPackage(this.getClass()); return prefs.getByteArray("licence."+ option.getHostname(),null); */ Storage store = Storage.getLocalStorageIfSupported(); if (store != null) { return store.getItem("licence." + option.getHostname()).getBytes(); } else return null; }
public void save_licence(byte[] databytes, Options option) { /* Preferences prefs = Preferences.userNodeForPackage(this.getClass()); prefs.putByteArray("licence."+ option.getHostname(), databytes); */ Storage store = Storage.getLocalStorageIfSupported(); if (store != null) store.setItem("licence." + option.getHostname(), new String(databytes)); }