Package io.jmix.flowui.download
Class ByteArrayDownloadDataProvider
java.lang.Object
io.jmix.flowui.download.ByteArrayDownloadDataProvider
- All Implemented Interfaces:
DownloadDataProvider
-
Field Summary
-
Constructor Summary
ConstructorDescriptionByteArrayDownloadDataProvider
(byte[] data, int saveExportedByteArrayDataThresholdBytes, String tempDir) Constructor. -
Method Summary
Modifier and TypeMethodDescriptionprotected InputStream
readFromTempStorage
(File file) protected File
saveToTempStorage
(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 ifsaveExportedByteArrayDataThresholdBytes
is exceeded. UseCoreProperties.getTempDir()
.
-
-
Method Details
-
saveToTempStorage
-
readFromTempStorage
-
getStream
- Specified by:
getStream
in interfaceDownloadDataProvider
-