Package org.primefaces.model.file
Class CommonsUploadedFile
- java.lang.Object
-
- org.primefaces.model.file.CommonsUploadedFile
-
- All Implemented Interfaces:
Serializable,UploadedFile
public class CommonsUploadedFile extends Object implements UploadedFile, Serializable
Default UploadedFile implementation based on Commons FileUpload FileItem- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description CommonsUploadedFile()CommonsUploadedFile(org.apache.commons.fileupload.FileItem fileItem, Long sizeLimit)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voiddelete()byte[]getContent()StringgetContentType()StringgetFileName()InputStreamgetInputStream()longgetSize()voidwrite(String filePath)
-
-
-
Constructor Detail
-
CommonsUploadedFile
public CommonsUploadedFile()
-
CommonsUploadedFile
public CommonsUploadedFile(org.apache.commons.fileupload.FileItem fileItem, Long sizeLimit)
-
-
Method Detail
-
getFileName
public String getFileName()
- Specified by:
getFileNamein interfaceUploadedFile
-
getInputStream
public InputStream getInputStream() throws IOException
- Specified by:
getInputStreamin interfaceUploadedFile- Throws:
IOException
-
getSize
public long getSize()
- Specified by:
getSizein interfaceUploadedFile
-
getContent
public byte[] getContent()
- Specified by:
getContentin interfaceUploadedFile
-
getContentType
public String getContentType()
- Specified by:
getContentTypein interfaceUploadedFile
-
write
public void write(String filePath) throws Exception
- Specified by:
writein interfaceUploadedFile- Throws:
Exception
-
delete
public void delete() throws IOException- Specified by:
deletein interfaceUploadedFile- Throws:
IOException
-
-