Package de.mediathekview.mlib.tool
Class FilenameUtils
java.lang.Object
de.mediathekview.mlib.tool.FilenameUtils
User: crystalpalace1977
Date: 28.12.14
Time: 16:02
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic StringcheckDateiname(String name, boolean isPath) static StringremoveIllegalCharacters(String input, boolean isPath) Remove illegal characters from String based on current OS.static StringreplaceLeerDateiname(String name, boolean isPath, boolean userReplace, boolean onlyAscii) Remove illegal file name characters
-
Field Details
-
REGEXP_ILLEGAL_CHARACTERS_WINDOWS
Valid characters for Windows in file names: Based on http://msdn.microsoft.com/en-us/library/windows/desktop/aa365247(v=vs.85).aspx- See Also:
-
REGEXP_ILLEGAL_CHARACTERS_WINDOWS_PATH
- See Also:
-
REGEXP_ILLEGAL_CHARACTERS_OTHERS
Valid characters for all UNIX-like OS.- See Also:
-
REGEXP_ILLEGAL_CHARACTERS_OTHERS_PATH
- See Also:
-
-
Constructor Details
-
FilenameUtils
public FilenameUtils()
-
-
Method Details
-
checkDateiname
-
removeIllegalCharacters
Remove illegal characters from String based on current OS.- Parameters:
input- The input stringisPath- Flag to switch replacing of illegal path characters on and off- Returns:
- Cleaned-up string.
-
replaceLeerDateiname
public static String replaceLeerDateiname(String name, boolean isPath, boolean userReplace, boolean onlyAscii) Remove illegal file name characters- Parameters:
name- The file nameisPath- Flag to switch replacing of illegal path characters on and offuserReplace- Flag to switch the user replacing table on and offonlyAscii- Flag to switch if only ASCII characters should be allowed- Returns:
- Bereinigte Fassung
-