Class FileBuffer
java.lang.Object
com.vaadin.flow.component.upload.receivers.AbstractFileBuffer
com.vaadin.flow.component.upload.receivers.FileBuffer
- All Implemented Interfaces:
Receiver
,Serializable
@Deprecated(since="24.8",
forRemoval=true)
public class FileBuffer
extends AbstractFileBuffer
implements Receiver
Deprecated, for removal: This API element is subject to removal in a future version.
Basic in file receiver implementation. File is stored by default to File
created using
File.createTempFile(String, String)
with a null
suffix.
For a custom file the constructor AbstractFileBuffer(FileFactory)
should be used.
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionDeprecated, for removal: This API element is subject to removal in a future version.Creates a file buffer with a default file factory.FileBuffer
(FileFactory factory) Deprecated, for removal: This API element is subject to removal in a future version.Creates a file buffer that uses a file factory to create a custom uploadFile
. -
Method Summary
Modifier and TypeMethodDescriptionDeprecated, for removal: This API element is subject to removal in a future version.Get the file data object.Deprecated, for removal: This API element is subject to removal in a future version.Get the output stream for file.Deprecated, for removal: This API element is subject to removal in a future version.Get the file name for this buffer.Deprecated, for removal: This API element is subject to removal in a future version.Get the input stream for file.receiveUpload
(String fileName, String mimeType) Deprecated, for removal: This API element is subject to removal in a future version.Invoked when a new upload arrives.Methods inherited from class com.vaadin.flow.component.upload.receivers.AbstractFileBuffer
createFileOutputStream, getLogger
-
Constructor Details
-
FileBuffer
public FileBuffer()Deprecated, for removal: This API element is subject to removal in a future version.Creates a file buffer with a default file factory.Files will be created using
File.createTempFile(String, String)
and have that build 'upload_tmpfile_{FILENAME}_{currentTimeMillis}' -
FileBuffer
Deprecated, for removal: This API element is subject to removal in a future version.Creates a file buffer that uses a file factory to create a custom uploadFile
.- Parameters:
factory
- file factory for file buffer
-
-
Method Details
-
receiveUpload
Deprecated, for removal: This API element is subject to removal in a future version.Description copied from interface:Receiver
Invoked when a new upload arrives.- Specified by:
receiveUpload
in interfaceReceiver
- Parameters:
fileName
- the desired filename of the upload, usually as specified by the clientmimeType
- the MIME type of the uploaded file- Returns:
- stream to which the uploaded file should be written
-
getFileData
Deprecated, for removal: This API element is subject to removal in a future version.Get the file data object.- Returns:
- file data for the latest upload or null
-
getFileName
Deprecated, for removal: This API element is subject to removal in a future version.Get the file name for this buffer.- Returns:
- file name or empty if no file
-
getFileDescriptor
Deprecated, for removal: This API element is subject to removal in a future version.Get the output stream for file.- Returns:
- file output stream or null if not available
-
getInputStream
Deprecated, for removal: This API element is subject to removal in a future version.Get the input stream for file.- Returns:
- input stream for file or empty stream if file not found
-
UploadHandler
instead