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 Summary
Modifier and TypeMethodDescriptioncreateAttribute(String name, String value) Creates an attribute.createFileUpload(String name, String filename, MediaType contentType, @Nullable String encoding, @Nullable Charset charset, long length) Creates a file upload.voidsetContent(T fileUploadObject, Object content) Sets the content on the file upload object.
-
Method Details
-
createFileUpload
T createFileUpload(String name, String filename, MediaType contentType, @Nullable String encoding, @Nullable Charset charset, long length) Creates a file upload.- Parameters:
name- The name of the filefilename- The file namecontentType- The content typeencoding- The encodingcharset- The charsetlength- The length- Returns:
- The file upload
-
createAttribute
-
setContent
Sets the content on the file upload object.- Parameters:
fileUploadObject- The file upload objectcontent- The content- Throws:
IOException- When the content cannot be set
-