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 UHFileDatagetFileData(java.lang.String fileName)Get file data for upload with file name.java.io.FileDescriptorgetFileDescriptor(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.InputStreamgetInputStream(java.lang.String fileName)Get the input stream for file with fileName.java.io.OutputStreamreceiveUpload(java.lang.String fileName, java.lang.String MIMEType)Invoked when a new upload arrives.
-
Constructor Details
-
UHMultiFileBuffer
public UHMultiFileBuffer()
-
-
Method Details
-
receiveUpload
public java.io.OutputStream receiveUpload(java.lang.String fileName, java.lang.String MIMEType)Description copied from interface:UHReceiverInvoked when a new upload arrives.- Specified by:
receiveUploadin interfaceUHReceiver- Parameters:
fileName- the desired filename of the upload, usually as specified by the clientMIMEType- 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
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
-