Package sk.iway.iwcm.common
Class FileBrowserTools
java.lang.Object
sk.iway.iwcm.common.FileBrowserTools
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic IwcmFilecleanMetadata(InputStream is, int length, String filename, boolean closeIs) static StringgetForbiddenSymbol(String name) Finds a forbidden character or substring using the same exceptions as filename validation.static booleanhasForbiddenSymbol(String name) Checks whether a file name or path contains a forbidden character or substring.
-
Constructor Details
-
FileBrowserTools
protected FileBrowserTools()
-
-
Method Details
-
hasForbiddenSymbol
Checks whether a file name or path contains a forbidden character or substring.- Parameters:
name- file name or path to check; may benull- Returns:
truewhen a forbidden character or substring is found
-
getForbiddenSymbol
Finds a forbidden character or substring using the same exceptions as filename validation.- Parameters:
name- file name or path to check; may benull- Returns:
- the first matching token in the forbidden list, or
nullwhen none is found
-
cleanMetadata
-