Package io.jmix.flowui.download
Class ByteArrayDownloadDataProvider
java.lang.Object
io.jmix.flowui.download.ByteArrayDownloadDataProvider
- All Implemented Interfaces:
DownloadDataProvider
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionByteArrayDownloadDataProvider(byte[] data, int saveExportedByteArrayDataThresholdBytes, String tempDir) Constructor. -
Method Summary
Modifier and TypeMethodDescriptionprotected InputStreamreadFromTempStorage(File file) protected FilesaveToTempStorage(byte[] data, String tempDir)
-
Field Details
-
supplier
-
-
Constructor Details
-
ByteArrayDownloadDataProvider
public ByteArrayDownloadDataProvider(byte[] data, int saveExportedByteArrayDataThresholdBytes, String tempDir) Constructor.- Parameters:
data- byte arraysaveExportedByteArrayDataThresholdBytes- threshold in bytes on which downloaded byte array will be saved to a temporary file to prevent HTTP session memory leaks. UseUiProperties.getSaveExportedByteArrayDataThresholdBytes().tempDir- where to store the temporary file ifsaveExportedByteArrayDataThresholdBytesis exceeded. UseCoreProperties.getTempDir().
-
-
Method Details
-
saveToTempStorage
-
readFromTempStorage
-
getStream
- Specified by:
getStreamin interfaceDownloadDataProvider
-