Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
  package com.koushikdutta.ion.builder;
  
  import  android.util.Xml;
  
  
 
 import java.io.File;
Created by koush on 5/30/13.
  // get the result, transformed to how you want it
 public interface FutureBuilder extends BitmapFutureBuilderImageViewFutureBuilder {
    
Execute the request and get the result as a String

Returns:
 
     public ResponseFuture<StringasString();

    
Execute the request and get the result as an InputStream. This method will load the entire response into memory and should not be used for large responses.

Returns:
 
     public ResponseFuture<InputStreamasInputStream();

    
Execute the request and get the result as a (Gson) JsonArray

Returns:
 
     public ResponseFuture<JsonArrayasJsonArray();

    
Execute the request and get the result as a (Gson) JsonObject

Returns:
 
     public ResponseFuture<JsonObjectasJsonObject();

    
Execute the request and get the result as an XML Document

Returns:
 
     public ResponseFuture<DocumentasDocument();

    
Use the request as a Bitmap which can then be modified and/or applied to an ImageView.

Returns:
 
     public Builders.Any.BF<? extends Builders.Any.BF<?>> withBitmap();

    
Execute the request and write it to the given OutputStream. The OutputStream will be closed upon finishing.

Parameters:
outputStream OutputStream to write the request
Returns:
 
     public <T extends OutputStreamResponseFuture<T> write(T outputStream);

    
Execute the request and write it to the given OutputStream. Specify whether the OutputStream will be closed upon finishing.

Parameters:
outputStream OutputStream to write the request
close Indicate whether the OutputStream should be closed on completion.
Returns:
 
     public <T extends OutputStreamResponseFuture<T> write(T outputStreamboolean close);

    
Execute the request and write the results to a file

Parameters:
file File to write
Returns:
 
     public ResponseFuture<Filewrite(File file);

    
Deserialize the JSON request into a Java object of the given class using Gson.

Parameters:
<T>
Returns:
 
     public <T> ResponseFuture<T> as(Class<T> clazz);

    
Deserialize the JSON request into a Java object of the given class using Gson.

Parameters:
token
<T>
Returns:
 
     public <T> ResponseFuture<T> as(TypeToken<T> token);

    
Add this request to a group specified by groupKey. This key can be used in a later call to Ion.cancelAll(groupKey) to cancel all the requests in the same group.

Parameters:
groupKey
Returns:
    public FutureBuilder group(Object groupKey);
New to GrepCode? Check out our FAQ X