Package mg.emberframework.utils.io
Class FileUtils
java.lang.Object
mg.emberframework.utils.io.FileUtils
-
Method Summary
Modifier and TypeMethodDescriptionstatic String
changeFileName
(String oldFileName, String newBaseName) static String
createFilePath
(String dirPath, String fileName) static File
createRequestFile
(String name, jakarta.servlet.http.HttpServletRequest request) static String
getFileExtension
(String fileName) static byte[]
getPartByte
(jakarta.servlet.http.Part part) static byte[]
getPartByte
(String name, jakarta.servlet.http.HttpServletRequest request) static String
getSimpleFileName
(String fileName, String extension)
-
Method Details
-
createRequestFile
public static File createRequestFile(String name, jakarta.servlet.http.HttpServletRequest request) throws IOException, jakarta.servlet.ServletException - Throws:
IOException
jakarta.servlet.ServletException
-
getPartByte
public static byte[] getPartByte(String name, jakarta.servlet.http.HttpServletRequest request) throws IOException, jakarta.servlet.ServletException - Throws:
IOException
jakarta.servlet.ServletException
-
getPartByte
- Throws:
IOException
-
createFilePath
-
getSimpleFileName
-
getFileExtension
-
changeFileName
-