Package com.helger.web.fileupload.io
Class FileUploadHelper
- java.lang.Object
-
- com.helger.web.fileupload.io.FileUploadHelper
-
@Immutable public final class FileUploadHelper extends Object
Utility class for working with streams.
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static StringcheckFileName(String sFilename)Checks, whether the given file name is valid in the sense, that it doesn't contain any NUL characters.
-
-
-
Method Detail
-
checkFileName
@Nullable public static String checkFileName(@Nullable String sFilename)
Checks, whether the given file name is valid in the sense, that it doesn't contain any NUL characters. If the file name is valid, it will be returned without any modifications. Otherwise, anInvalidFileNameExceptionis raised.- Parameters:
sFilename- The file name to check- Returns:
- Unmodified file name, if valid.
- Throws:
InvalidFileNameException- The file name was found to be invalid.
-
-