Package de.xima.fc.http
Class FileBodyBuilder
- java.lang.Object
 - 
- de.xima.fc.http.FileBodyBuilder
 
 
- 
- All Implemented Interfaces:
 IFileBodyBuilder<FileBodyBuilder>,IHttpBodyBuilder
public class FileBodyBuilder extends Object implements IFileBodyBuilder<FileBodyBuilder>
 
- 
- 
Constructor Summary
Constructors Constructor Description FileBodyBuilder(HttpRequestBuilder builder) 
- 
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description HttpRequestBuilderbuild()Adds the multipart body to the HTTP requests builder and returns the HTTP request builder.voidoverrideContentType(String contentType)Method to override the content typeFileBodyBuildersetFile(BinaryData data) 
 - 
 
- 
- 
Constructor Detail
- 
FileBodyBuilder
public FileBodyBuilder(HttpRequestBuilder builder)
 
 - 
 
- 
Method Detail
- 
setFile
public FileBodyBuilder setFile(BinaryData data)
- 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
public HttpRequestBuilder 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
 
 - 
 
 -