Class DefaultPromptFileStorage
java.lang.Object
de.xima.fc.prompt.service.defaults.DefaultPromptFileStorage
Default implementations of
IPromptFileStorage.- Since:
- 8.5.0
-
Method Summary
Modifier and TypeMethodDescriptionstatic IPromptFileStorageofFileCreator(ISerializableThrowingSupplier<Path> fileCreator) Creates a newIPromptFileStoragethat uses the given file creator to create (temporary) files on the file system that will be used to store the binary data.static IPromptFileStorageCreates a newIPromptFileStoragethat stores all binary data in memory.
-
Method Details
-
ofFileCreator
Creates a newIPromptFileStoragethat uses the given file creator to create (temporary) files on the file system that will be used to store the binary data. The caller is responsible for cleaning up the created files.- Parameters:
fileCreator- The temporary file creator to use.- Returns:
- A new
IPromptFileStorageinstance.
-
ofInMemory
Creates a newIPromptFileStoragethat stores all binary data in memory. Use with caution, as this may lead to high memory consumption if large files are stored.- Returns:
- A new
IPromptFileStorageinstance.
-