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. If null, the field's name will be used.
    • getMimeType

      String getMimeType()
      Returns MIME type. If null, MIME type will be determined from file name's extension.
    • getSize

      int getSize()
      Returns size in bytes.
    • openInputStream

      InputStream openInputStream() throws IOException
      Opens InputStream. User is responsible for closing it.
      Throws:
      IOException