Interface IFileListHandler<File>
- Type Parameters:
File- The type representing a file in the underlying storage system.
- All Superinterfaces:
Serializable
Interface for handling files within the
<xi:fileList handler=#{...}/> component. The handler is responsible
for storing uploaded files, and retrieving them when the user wishes to download them.- Since:
- 8.5.0
-
Method Summary
Modifier and TypeMethodDescriptionextractFileName(File file) Extracts the file name from a given file object.longextractFileSize(File file) Extracts the file size from a given file object, in bytes.extractMimeType(File file) Extracts the MIME type from a given file object.Opens an input stream to read the contents of a given file.processFileUpload(IFileListUpload upload) Processes an uploaded file and stores it in the underlying storage system.
-
Method Details
-
extractFileName
-
extractFileSize
Extracts the file size from a given file object, in bytes.- Parameters:
file- The file object.- Returns:
- The size of the file in bytes.
-
extractMimeType
-
openFile
Opens an input stream to read the contents of a given file.- Parameters:
file- The file object.- Returns:
- An InputStream to read the file's contents.
- Throws:
IOException- If an I/O error occurs while opening the stream.
-
processFileUpload
Processes an uploaded file and stores it in the underlying storage system.- Parameters:
upload- The uploaded file information.- Returns:
- The stored file object.
- Throws:
IOException- If an I/O error occurs during file processing.
-