public class PreferencesHelper
extends java.lang.Object
| Modifier and Type | Method and Description |
|---|---|
static java.io.File |
getFile(java.util.prefs.Preferences prefs,
java.lang.String key)
Returns the File represented by the string associated with the specified key in this preference node.
|
static java.io.File |
getFile(java.util.prefs.Preferences prefs,
java.lang.String key,
java.io.File defFile)
Returns the File represented by the string associated with the specified key in this preference node.
|
static java.lang.String |
getFileName(java.util.prefs.Preferences prefs,
java.lang.String key,
java.lang.String path)
Returns the FileName represented by the string associated with the specified key in this preference node.
|
static java.io.File |
getFileRelativeTo(java.util.prefs.Preferences prefs,
java.lang.String key,
java.io.File defFile,
java.io.File dir)
Returns the File represented by the string associated with the specified key in this preference node.
|
static void |
putFile(java.util.prefs.Preferences prefs,
java.lang.String key,
java.io.File file)
Associates a string representing the specified File with the specified key in this preference node.
|
static void |
putFileName(java.util.prefs.Preferences prefs,
java.lang.String key,
java.lang.String fileName)
Associates a string representing the specified File name with the specified key in this preference node.
|
static void |
putFileRelativeTo(java.util.prefs.Preferences prefs,
java.lang.String key,
java.io.File file,
java.io.File dir)
Associates a string representing the specified File with the specified key in this preference node.
|
public static void putFileRelativeTo(java.util.prefs.Preferences prefs,
java.lang.String key,
java.io.File file,
java.io.File dir)
prefs - the preferences nodekey - the keyfile - the Filedir - the reference directorypublic static void putFile(java.util.prefs.Preferences prefs,
java.lang.String key,
java.io.File file)
It is guaranteed that the associated stored value will be a valid escaped UTF8 character sequence.
prefs - the preferences nodekey - the keyfile - the Filepublic static void putFileName(java.util.prefs.Preferences prefs,
java.lang.String key,
java.lang.String fileName)
prefs - the preferences nodekey - the keyfileName - the File namepublic static java.lang.String getFileName(java.util.prefs.Preferences prefs,
java.lang.String key,
java.lang.String path)
prefs - the preferences nodekey - the keypath - the default pathputFileName(Preferences, String, String)public static java.io.File getFileRelativeTo(java.util.prefs.Preferences prefs,
java.lang.String key,
java.io.File defFile,
java.io.File dir)
prefs - the preferences nodekey - the keydefFile - the default file to use if the value is not found in the Preferencesdir - the parent directory to use for relative filesputFile(Preferences, String, File)public static java.io.File getFile(java.util.prefs.Preferences prefs,
java.lang.String key,
java.io.File defFile)
prefs - the Preferences Nodekey - the keydefFile - the default filepublic static java.io.File getFile(java.util.prefs.Preferences prefs,
java.lang.String key)
prefs - the Preferences Nodekey - the keygetFile(Preferences, String, File)