Class UHMultiFileBuffer

java.lang.Object
org.vaadin.addons.f0rce.uploadhelper.receiver.UHAbstractFileBuffer
org.vaadin.addons.f0rce.uploadhelper.receiver.UHMultiFileBuffer
All Implemented Interfaces:
java.io.Serializable, UHMultiFileReceiver, UHReceiver

public class UHMultiFileBuffer
extends UHAbstractFileBuffer
implements UHMultiFileReceiver
See Also:
Serialized Form
  • Constructor Summary

    Constructors 
    Constructor Description
    UHMultiFileBuffer()  
  • Method Summary

    Modifier and Type Method Description
    UHFileData getFileData​(java.lang.String fileName)
    Get file data for upload with file name.
    java.io.FileDescriptor getFileDescriptor​(java.lang.String fileName)
    Get the output stream for file.
    java.util.Set<java.lang.String> getFiles()
    Get the files stored for this buffer.
    java.io.InputStream getInputStream​(java.lang.String fileName)
    Get the input stream for file with fileName.
    java.io.OutputStream receiveUpload​(java.lang.String fileName, java.lang.String MIMEType)
    Invoked when a new upload arrives.

    Methods inherited from class java.lang.Object

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

  • Method Details

    • receiveUpload

      public java.io.OutputStream receiveUpload​(java.lang.String fileName, java.lang.String MIMEType)
      Description copied from interface: UHReceiver
      Invoked when a new upload arrives.
      Specified by:
      receiveUpload in interface UHReceiver
      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 java.util.Set<java.lang.String> getFiles()
      Get the files stored for this buffer.
      Returns:
      files stored
    • getFileData

      public UHFileData getFileData​(java.lang.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 java.io.FileDescriptor getFileDescriptor​(java.lang.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 java.io.InputStream getInputStream​(java.lang.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