List of usage examples for com.google.gwt.corp.localstorage LocalStorage getItem
public static String getItem(String key) throws IOException
From source file:com.badlogic.gdx.backends.gwt.GwtPreferences.java
License:Apache License
GwtPreferences(String prefix) {
this.prefix = prefix + ":";
int prefixLength = this.prefix.length();
try {/* ww w .j a v a 2 s. c om*/
for (int i = 0; i < LocalStorage.length(); i++) {
String key = LocalStorage.key(i);
if (key.startsWith(prefix)) {
String value = LocalStorage.getItem(key);
values.put(key.substring(prefixLength, key.length() - 1), toObject(key, value));
}
}
} catch (Exception e) {
values.clear();
}
}