java.lang.Objectcom.realtime.crossfire.jxclient.settings.Filenames
public class Filenames
Utility class to return references to settings files.
| Constructor Summary | |
|---|---|
private |
Filenames()
Private constructor to prevent instantiation. |
| Method Summary | |
|---|---|
private static java.lang.String |
encode(java.lang.CharSequence str)
Encode a string to make it safe as a file name. |
private static java.io.File |
getCrossfireFile()
Return the crossfire settings directory. |
static java.io.File |
getDialogsFile(java.lang.String skinName)
Return the file for storing dialog related information for a skin. |
static java.io.File |
getKeybindingsFile(java.lang.CharSequence hostname,
java.lang.CharSequence character)
Return the keybindings file. |
static java.io.File |
getMagicMapImageCacheDir()
Return the image cache directory for magic map sized images. |
static java.io.File |
getMetaserverCacheFile()
Return the metaserver cache file. |
static java.io.File |
getOriginalImageCacheDir()
Return the image cache directory. |
static java.io.File |
getScaledImageCacheDir()
Return the image cache directory for double size images. |
static java.io.File |
getSettingsFile()
Return the main settings file. |
static java.io.File |
getSettingsFile(java.lang.String filename)
Return a file within the settings directory. |
static java.io.File |
getShortcutsFile(java.lang.CharSequence hostname,
java.lang.CharSequence character)
Return the shortcuts file. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
private Filenames()
| Method Detail |
|---|
@NotNull
private static java.lang.String encode(@NotNull
java.lang.CharSequence str)
str - The string to encode.
@NotNull
private static java.io.File getCrossfireFile()
throws java.io.IOException
java.io.IOException - If the settings directory cannot be located.
@NotNull
public static java.io.File getDialogsFile(@NotNull
java.lang.String skinName)
throws java.io.IOException
skinName - Identifies the skin.
java.io.IOException - If the file cannot be accessed.
@Nullable
public static java.io.File getKeybindingsFile(@Nullable
java.lang.CharSequence hostname,
@Nullable
java.lang.CharSequence character)
hostname - The hostname of the character; null=global
key bindings file.character - The character name; null=global key
bindings file.
null if the file cannot
be accessed.@NotNull public static java.io.File getMagicMapImageCacheDir()
@Nullable public static java.io.File getMetaserverCacheFile()
null if the file
cannot be accessed.@NotNull public static java.io.File getOriginalImageCacheDir()
@NotNull public static java.io.File getScaledImageCacheDir()
@NotNull
public static java.io.File getSettingsFile()
throws java.io.IOException
java.io.IOException - If the file cannot be accessed.
@NotNull
public static java.io.File getSettingsFile(@NotNull
java.lang.String filename)
throws java.io.IOException
filename - The filename.
java.io.IOException - If the file cannot be accessed.
@NotNull
public static java.io.File getShortcutsFile(@NotNull
java.lang.CharSequence hostname,
@NotNull
java.lang.CharSequence character)
throws java.io.IOException
hostname - The hostname of the character; null=global
key bindings file.character - The character name; null=global key
bindings file.
java.io.IOException - If the file cannot be accessed.