Class FileUploadable
java.lang.Object
jodd.http.upload.FileUploadable
- All Implemented Interfaces:
Uploadable<File>
File uploadable.
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionFileUploadable(File file) FileUploadable(File file, String fileName, String mimeType) -
Method Summary
-
Field Details
-
file
-
fileName
-
mimeType
-
-
Constructor Details
-
FileUploadable
-
FileUploadable
-
-
Method Details
-
getContent
Description copied from interface:UploadableReturns the original content.- Specified by:
getContentin interfaceUploadable<File>
-
getBytes
public byte[] getBytes()Description copied from interface:UploadableReturns content bytes.- Specified by:
getBytesin interfaceUploadable<File>
-
getFileName
Description copied from interface:UploadableReturns content file name. Ifnull, the field's name will be used.- Specified by:
getFileNamein interfaceUploadable<File>
-
getMimeType
Description copied from interface:UploadableReturns MIME type. Ifnull, MIME type will be determined fromfile name'sextension.- Specified by:
getMimeTypein interfaceUploadable<File>
-
getSize
public int getSize()Description copied from interface:UploadableReturns size in bytes.- Specified by:
getSizein interfaceUploadable<File>
-
openInputStream
Description copied from interface:UploadableOpensInputStream. User is responsible for closing it.- Specified by:
openInputStreamin interfaceUploadable<File>- Throws:
IOException
-