本文整理汇总了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();
}
}