}
public void reset(String key) throws ReadOnlyException {
// Read-only preferences cannot be reset.
if (isReadOnly(key)) {
throw new ReadOnlyException(EXCEPTIONS.getString(
"error.preference.readonly", "Preference key "));
}
// Try to reset preference to the default values.
boolean resetDone = false;
for (int i = 0; !resetDone && i < defaultPreferences.length; i++) {