com.vaadin.flow.component.upload.receivers.
java.lang.Object
com.vaadin.flow.component.upload.receivers.FileData

All Implemented Interfaces:

Serializable

public class FileData extends Object implements Serializable

Class containing file information for upload.

See Also:

  • Constructor Details

    • FileData

      public FileData(String fileName, String mimeType, OutputStream outputBuffer)

      Create a FileData instance for a file.

      Parameters:

      fileName - the file name

      mimeType - the file MIME type

      outputBuffer - the output buffer where to write the file

  • Method Details

    • 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 null

      UnsupportedOperationException - if outputBuffer is not an UploadOutputStream