com.vaadin.flow.component.upload.receivers.
Class MemoryBuffer
- java.lang.Object
-
- com.vaadin.flow.component.upload.receivers.MemoryBuffer
-
-
Constructor Summary
Constructors Constructor and Description MemoryBuffer()
-
Method Summary
All Methods Modifier and Type Method and Description FileData
getFileData()
Get the file data object.
String
getFileName()
Get the file name for this buffer.
InputStream
getInputStream()
Get the input stream for file with filename.
OutputStream
receiveUpload(String fileName, String MIMEType)
Invoked when a new upload arrives.
-
-
-
Method Detail
-
receiveUpload
public OutputStream receiveUpload(String fileName, String MIMEType)
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 client.MIMEType
- the MIME type of the uploaded file.Returns:
Stream to which the uploaded file should be written.
-
getFileData
public FileData getFileData()
Get the file data object.
Returns:
file data for the latest upload or null
-
getFileName
public String getFileName()
Get the file name for this buffer.
Returns:
file name or empty if no file
-
getInputStream
public InputStream getInputStream()
Get the input stream for file with filename.
Returns:
input stream for file or empty stream if file not found
-
-