本文整理匯總了Java中java.util.prefs.BackingStoreException.printStackTrace方法的典型用法代碼示例。如果您正苦於以下問題:Java BackingStoreException.printStackTrace方法的具體用法?Java BackingStoreException.printStackTrace怎麽用?Java BackingStoreException.printStackTrace使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類java.util.prefs.BackingStoreException
的用法示例。
在下文中一共展示了BackingStoreException.printStackTrace方法的4個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: setShowCreditsFrame
import java.util.prefs.BackingStoreException; //導入方法依賴的package包/類
public static void setShowCreditsFrame(boolean value) {
p.putBoolean(KEY_CREDITS_FRAME, value);
try {
p.sync();
} catch (BackingStoreException e) {
e.printStackTrace();
}
}
示例2: clearPreferences
import java.util.prefs.BackingStoreException; //導入方法依賴的package包/類
/**
* <p>Delete all stored preferences. There is no way to recover them after calling this method short of restoring the entire system from a backup.</p>
* */
public void clearPreferences() {
try {
prefs.clear();
} catch (BackingStoreException e) {
e.printStackTrace();
}
}
示例3: setPreferences
import java.util.prefs.BackingStoreException; //導入方法依賴的package包/類
/**
* Changes the Preference Node for this instance of ParameterContainer
* @param prefs The new preference node.
*/
public void setPreferences(Preferences prefs) {
if (!prefs.absolutePath().equals(this.prefs.absolutePath())) {
try {
this.prefs.removeNode();
} catch (BackingStoreException e) {
e.printStackTrace();
}
this.prefs = prefs;
}
}
示例4: exportPreferences
import java.util.prefs.BackingStoreException; //導入方法依賴的package包/類
/** exports preference values for this node of the chip preferences. Bias values should be stored at the root of the Chip, since
* nodes branching from this root are not exported, in order to avoid cluttering the bias settings files with other preferences, e.g. for
* EventFilter's.
* <p>
* Biases and other settings (e.g. master bias resistor) are written to the output stream as an XML file
*@param os an output stream, typically constructed for a FileOutputStream
*@throws IOException if the output stream cannot be written
*/
public void exportPreferences(java.io.OutputStream os) throws java.io.IOException {
storePreferences();
try {
prefs.exportNode(os);
prefs.flush();
log.info("exported prefs=" + prefs + " to os=" + os);
} catch (BackingStoreException bse) {
bse.printStackTrace();
}
}