Interface MultipartDataFactory<T>

Type Parameters:
T - The file upload type

public interface MultipartDataFactory<T>
A factory for Multipart data.
Since:
2.0
Author:
graemerocher
  • Method Details

    • createFileUpload

      @NonNull T createFileUpload(@NonNull String name, @NonNull String filename, @NonNull MediaType contentType, @Nullable String encoding, @Nullable Charset charset, long length)
      Creates a file upload.
      Parameters:
      name - The name of the file
      filename - The file name
      contentType - The content type
      encoding - The encoding
      charset - The charset
      length - The length
      Returns:
      The file upload
    • createAttribute

      @NonNull T createAttribute(@NonNull String name, @NonNull String value)
      Creates an attribute.
      Parameters:
      name - The name of the attribute
      value - The value of the attribute
      Returns:
      The attribute
    • setContent

      void setContent(T fileUploadObject, Object content) throws IOException
      Sets the content on the file upload object.
      Parameters:
      fileUploadObject - The file upload object
      content - The content
      Throws:
      IOException - When the content cannot be set