com.vaadin.flow.component.upload.receivers.
Class FileData
- java.lang.Object
-
- com.vaadin.flow.component.upload.receivers.FileData
-
All Implemented Interfaces:
public class FileData extends Object implements Serializable
Class containing file information for upload.
See Also:
-
-
Constructor Summary
Constructors Constructor Description FileData(String fileName, String mimeType, OutputStream outputBuffer)
Create a FileData instance for a file.
-
Method Summary
All Methods Modifier and Type Method Description File
getFile()
String
getFileName()
Return the name of this file.
String
getMimeType()
Return the mimeType of this file.
OutputStream
getOutputBuffer()
Return the output buffer for this file data.
-
-
-
Constructor Detail
-
FileData
public FileData(String fileName, String mimeType, OutputStream outputBuffer)
Create a FileData instance for a file.
Parameters:
fileName
- the file namemimeType
- the file MIME typeoutputBuffer
- the output buffer where to write the file
-
-
Method Detail
-
getMimeType
public String getMimeType()
Return the mimeType of this file.
Returns:
mime types of the files
-
getFileName
public String getFileName()
Return the name of this file.
Returns:
file name
-
getOutputBuffer
public OutputStream getOutputBuffer()
Return the output buffer for this file data.
Returns:
output buffer
-
getFile
public File getFile()
Returns:
Temporary file containing the uploaded data.
Throws:
NullPointerException
- if outputBuffer is nullUnsupportedOperationException
- if outputBuffer is not anUploadOutputStream
-
-