Crossfire JXClient, Trunk
R20561
|
Utility class for manipulating filenames. More...
Static Public Member Functions | |
static String | quoteName (@NotNull final String name) |
Converts a file name to a "safe" form. More... | |
Private Member Functions | |
FilenameUtils () | |
Private constructor to prevent instantiation. More... | |
Static Private Attributes | |
static final String | REPLACEMENT_CHARACTER = "_" |
Replaces "unsafe" characters in file names (see UNSAFE_FILENAME_CHARACTERS). More... | |
static final Pattern | UNSAFE_FILENAME_CHARACTERS = Pattern.compile("[^a-zA-Z0-9_.]") |
Matches all characters that are considered "unsafe" for file names. More... | |
Utility class for manipulating filenames.
Definition at line 31 of file FilenameUtils.java.
|
private |
Private constructor to prevent instantiation.
Definition at line 50 of file FilenameUtils.java.
|
static |
Converts a file name to a "safe" form.
The returned file name will not contain any "unsafe" characters (see UNSAFE_FILENAME_CHARACTERS), and it will not be empty.
name | the file name to convert |
Definition at line 61 of file FilenameUtils.java.
References com.realtime.crossfire.jxclient.util.FilenameUtils.REPLACEMENT_CHARACTER.
Referenced by com.realtime.crossfire.jxclient.faces.FileCache.getImageFileName().
|
staticprivate |
Replaces "unsafe" characters in file names (see UNSAFE_FILENAME_CHARACTERS).
Definition at line 38 of file FilenameUtils.java.
Referenced by com.realtime.crossfire.jxclient.util.FilenameUtils.quoteName().
|
staticprivate |
Matches all characters that are considered "unsafe" for file names.
These characters will be replaced with REPLACEMENT_CHARACTER.
Definition at line 45 of file FilenameUtils.java.