Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
 package com.koushikdutta.ion.builder;
 
 import  com.koushikdutta.async.future.Future;
 
 import  org.json.JSONArray;
 import  org.json.JSONObject;
 
 import java.io.File;
Created by koush on 5/30/13.
 // get the result, transformed to how you want it
Execute the request and get the result as a String

Returns:
    public Future<StringasString();

    
Execute the request and get the result as a JSONObject

Returns:
    public Future<JSONObject> asJSONObject();

    
Execute the request and get the result as a JSONArray

Returns:
    public Future<JSONArray> asJSONArray();

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

Returns:
    public IonMutableBitmapRequestBuilder 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 OutputStream> Future<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 OutputStream> Future<T> write(T outputStreamboolean close);

    
Execute the request and write the results to a file

Parameters:
file File to write
Returns:
    public Future<Filewrite(File file);
New to GrepCode? Check out our FAQ X