com.vaadin.flow.component.upload.receivers.

Class MultiFileBuffer

    • Constructor Detail

      • MultiFileBuffer

        public MultiFileBuffer()
    • 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 interface Receiver

        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

      • getFiles

        public Set<String> getFiles()

        Get the files stored for this buffer.

        Returns:

        files stored

      • getFileData

        public FileData getFileData(String fileName)

        Get file data for upload with file name.

        Parameters:

        fileName - file name to get upload data for

        Returns:

        file data for filename or null if not found

      • getFileDescriptor

        public FileDescriptor getFileDescriptor(String fileName)

        Get the output stream for file.

        Parameters:

        fileName - name of file to get stream for

        Returns:

        file output stream or null if not available

      • getInputStream

        public InputStream getInputStream(String fileName)

        Get the input stream for file with fileName.

        Parameters:

        fileName - name of file to get input stream for

        Returns:

        input stream for file or empty stream if file not found