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