Class ProgressReportingRequestBody.MultiPartBuilder
java.lang.Object
com.amilesend.client.connection.file.ProgressReportingRequestBody.MultiPartBuilder
- Enclosing class:
- ProgressReportingRequestBody
The builder used to construct new 
ProgressReportingRequestBody instances for multipart uploads.- 
Method SummaryModifier and TypeMethodDescriptionbuild()Builds a newRequestBodythat tracks the transfer progress for multipart form-data transfer.callback(TransferProgressCallback callback) The callback listener.contentType(String contentType) The content type.destination(String destination) The destination descriptor (i.e., the name of the service).The attribute field name for the form data in the request.The file to upload.
- 
Method Details- 
fileThe file to upload.- Parameters:
- file- the path of the file to upload
- Returns:
- the builder
 
- 
fieldNameThe attribute field name for the form data in the request. Default isupload.- Parameters:
- fieldName- the field name
- Returns:
- the builder
 
- 
contentTypeThe content type. The default istext/csv.- Parameters:
- contentType- the content type
- Returns:
- the builder
 
- 
destinationThe destination descriptor (i.e., the name of the service).- Parameters:
- destination- the destination
- Returns:
- the builder
 
- 
callbackThe callback listener. Default is aLogProgressCallback.- Parameters:
- callback- the listener
- Returns:
- the builder
 
- 
buildBuilds a newRequestBodythat tracks the transfer progress for multipart form-data transfer.- Returns:
- the request body
- Throws:
- IOException- if an error occurred while accessing the file to read
 
 
-