Class MemoryBuffer

java.lang.Object
com.vaadin.flow.component.upload.receivers.MemoryBuffer
All Implemented Interfaces:
Receiver, Serializable

@Deprecated(since="24.8", forRemoval=true) public class MemoryBuffer extends Object implements Receiver
Deprecated, for removal: This API element is subject to removal in a future version.
Use UploadHandler instead
Basic in memory file receiver implementation.
See Also:
  • Constructor Summary

    Constructors
    Constructor
    Description
    Deprecated, for removal: This API element is subject to removal in a future version.
     
  • Method Summary

    Modifier and Type
    Method
    Description
    Deprecated, 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 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 with filename.
    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 java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • MemoryBuffer

      public MemoryBuffer()
      Deprecated, for removal: This API element is subject to removal in a future version.
  • Method Details

    • receiveUpload

      public OutputStream receiveUpload(String fileName, String MIMEType)
      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 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
    • getFileData

      public FileData 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

      public String 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
    • getInputStream

      public InputStream getInputStream()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Get the input stream for file with filename.
      Returns:
      input stream for file or empty stream if file not found