Class FileUploadHelper
java.lang.Object
com.apgar.common.lib.ui.widget.fileattachmentwidget.FileUploadHelper
This is a helper class used in
FileAttachmentUICustomWidget and FileUploadDownloadServlet to perform various file
manipulations.- Author:
- APGAR Consulting
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedFileUploadHelper(String uploadDir, String hash) protectedFileUploadHelper(String uploadDir, String table, String id, String field) -
Method Summary
Modifier and TypeMethodDescriptionprotected voidprotected FilegetDir()protected FilegetFile()protected static Fileprotected Stringprotected Stringprotected StringgetHash()protected Fileprotected Fileprotected Stringprotected voidprotected voidwriteFile(String filename, InputStream is) protected voidwriteTempFile(String filename, InputStream is)
-
Constructor Details
-
FileUploadHelper
-
FileUploadHelper
-
-
Method Details
-
writeFile
- Throws:
IOException
-
writeTempFile
- Throws:
IOException
-
cleanTempDir
- Throws:
IOException
-
initTempDir
- Throws:
IOException
-
getFileName
-
getTempFileName
-
getFileURL
-
getDir
-
getTempDir
-
getFile
-
getTempFile
-
getHash
-
getFile
-