org.jboss.aerogear.android.impl.pipeline
Class MultipartRequestBuilder<T>
java.lang.Object
org.jboss.aerogear.android.impl.pipeline.MultipartRequestBuilder<T>
- All Implemented Interfaces:
- RequestBuilder<T>
public class MultipartRequestBuilder<T>
- extends Object
- implements RequestBuilder<T>
This class generates a Multipart request with the type multipart/form-data
It will load the entire contents of files into memory before it uploads them.
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
MultipartRequestBuilder
public MultipartRequestBuilder()
getBody
public byte[] getBody(T data)
- Description copied from interface:
RequestBuilder
- This method creates the body of a request for a Pipe to use.
This is basically a serialization style operation.
- Specified by:
getBody in interface RequestBuilder<T>
- Parameters:
data - an object to form a body out of.
- Returns:
- A request body which represents the data parameter
getContentType
public String getContentType()
- Specified by:
getContentType in interface RequestBuilder<T>
- Returns:
- the Content-Type header to be sent to the server.
Copyright © 2013 JBoss by Red Hat. All Rights Reserved.