Interface Uploadable<T>
- All Known Implementing Classes:
ByteArrayUploadable, FileUploadable
public interface Uploadable<T>
Common interface of uploaded content for
form parameters.
All supported objects that can be uploaded using
the HttpBase.form(String, Object) has to
be wrapped with this interface.-
Method Details
-
getContent
T getContent()Returns the original content. -
getBytes
byte[] getBytes()Returns content bytes. -
getFileName
String getFileName()Returns content file name. Ifnull, the field's name will be used. -
getMimeType
String getMimeType()Returns MIME type. Ifnull, MIME type will be determined fromfile name'sextension. -
getSize
int getSize()Returns size in bytes. -
openInputStream
OpensInputStream. User is responsible for closing it.- Throws:
IOException
-