AeroGear Android Library 1.1.0

org.jboss.aerogear.android.impl.pipeline
Class MultipartRequestBuilder<T>

java.lang.Object
  extended by 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.


Constructor Summary
MultipartRequestBuilder()
           
 
Method Summary
 byte[] getBody(T data)
          This method creates the body of a request for a Pipe to use.
 String getContentType()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MultipartRequestBuilder

public MultipartRequestBuilder()
Method Detail

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.

AeroGear Android Library 1.1.0

Copyright © 2013 JBoss by Red Hat. All Rights Reserved.