Package de.xima.fc.http
Class FileBodyBuilder
java.lang.Object
de.xima.fc.http.FileBodyBuilder
- All Implemented Interfaces:
IFileBodyBuilder<FileBodyBuilder>,IHttpBodyBuilder
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()Adds the multipart body to the HTTP requests builder and returns the HTTP request builder.voidoverrideContentType(String contentType) Method to override the content typesetFile(BinaryData data)
-
Constructor Details
-
FileBodyBuilder
-
-
Method Details
-
setFile
- Specified by:
setFilein interfaceIFileBodyBuilder<FileBodyBuilder>- Parameters:
data- The file whose content should be sent as request body- Returns:
- This builder for chaining method calls.
-
build
Description copied from interface:IHttpBodyBuilderAdds the multipart body to the HTTP requests builder and returns the HTTP request builder.- Specified by:
buildin interfaceIHttpBodyBuilder- Returns:
- The HTTP request builder that was used to create this body builder.
-
overrideContentType
public void overrideContentType(String contentType) throws org.apache.http.ParseException, UnsupportedCharsetException Description copied from interface:IFileBodyBuilderMethod to override the content type- Specified by:
overrideContentTypein interfaceIFileBodyBuilder<FileBodyBuilder>- Parameters:
contentType- The content type to set- Throws:
org.apache.http.ParseException- On errors while parsing the content typeUnsupportedCharsetException- On errors while parsing the charset for the content type
-