Class UHFileData
java.lang.Object
org.vaadin.addons.f0rce.uploadhelper.receiver.UHFileData
- All Implemented Interfaces:
java.io.Serializable
public class UHFileData
extends java.lang.Object
implements java.io.Serializable
- See Also:
- Serialized Form
-
Constructor Summary
Constructors Constructor Description UHFileData(java.lang.String fileName, java.lang.String mimeType, java.io.OutputStream outputBuffer)
Create a UHFileData instance for a file. -
Method Summary
Modifier and Type Method Description java.io.File
getFile()
java.lang.String
getFileName()
Return the name of this file.java.lang.String
getMimeType()
Return the mimeType of this file.java.io.OutputStream
getOutputBuffer()
Return the output buffer for this file data.
-
Constructor Details
-
UHFileData
public UHFileData(java.lang.String fileName, java.lang.String mimeType, java.io.OutputStream outputBuffer)Create a UHFileData instance for a file.- Parameters:
fileName
- the file namemimeType
- the file MIME typeoutputBuffer
- the output buffer where to write the file
-
-
Method Details
-
getMimeType
public java.lang.String getMimeType()Return the mimeType of this file.- Returns:
- mime types of the files
-
getFileName
public java.lang.String getFileName()Return the name of this file.- Returns:
- file name
-
getOutputBuffer
public java.io.OutputStream getOutputBuffer()Return the output buffer for this file data.- Returns:
- output buffer
-
getFile
public java.io.File getFile()- Returns:
- Temporary file containing the uploaded data.
- Throws:
java.lang.NullPointerException
- if outputBuffer is nulljava.lang.UnsupportedOperationException
- if outputBuffer is not anUploadOutputStream
-