Package org.primefaces.model.file
Class NIOUploadedFile
- java.lang.Object
-
- org.primefaces.model.file.NIOUploadedFile
-
- All Implemented Interfaces:
UploadedFile
public class NIOUploadedFile extends Object implements UploadedFile
-
-
Constructor Summary
Constructors Constructor Description NIOUploadedFile()NIOUploadedFile(Path file, String filename, String contentType)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voiddelete()byte[]getContent()StringgetContentType()StringgetFileName()InputStreamgetInputStream()longgetSize()voidwrite(String filePath)
-
-
-
Method Detail
-
getFileName
public String getFileName()
- Specified by:
getFileNamein interfaceUploadedFile
-
getInputStream
public InputStream getInputStream() throws IOException
- Specified by:
getInputStreamin interfaceUploadedFile- Throws:
IOException
-
getContent
public byte[] getContent()
- Specified by:
getContentin interfaceUploadedFile
-
getContentType
public String getContentType()
- Specified by:
getContentTypein interfaceUploadedFile
-
getSize
public long getSize()
- Specified by:
getSizein 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
-
-