public class FileNameCharacterCheckerUtil extends Object
Constructor and Description |
---|
FileNameCharacterCheckerUtil() |
Modifier and Type | Method and Description |
---|---|
String |
assertFileNameDoesNotContainInvalidChars(String filename)
This will test the given filename string for any invalid characters.
|
static char[] |
getInvalidCharacters() |
String |
getPrintableInvalidCharacters() |
String |
replaceInvalidChars(String filename,
char replacementChar)
Replaces each invalid character of the given filename with the replacementChar.
|
public String assertFileNameDoesNotContainInvalidChars(String filename)
filename
- the filename to be checked.public String replaceInvalidChars(String filename, char replacementChar)
filename
- file name to replace invalid characters fromreplacementChar
- character to replace invalid charactersIllegalArgumentException
- if replacementChar is an invalid character itselfpublic String getPrintableInvalidCharacters()
public static char[] getInvalidCharacters()
Copyright © 2002-2022 Atlassian. All Rights Reserved.