Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
 package com.koushikdutta.ion;
 
 import  android.content.Context;
 
Created by koush on 5/22/13.
public interface Loader {
    public static class LoaderEmitter {
        public static final int LOADED_FROM_MEMORY = 0;
        public static final int LOADED_FROM_CACHE = 1;
        public static final int LOADED_FROM_CONDITIONAL_CACHE = 2;
        public static final int LOADED_FROM_NETWORK = 3;
        public LoaderEmitter(DataEmitter emitterlong lengthint loadedFrom,
                             HeadersResponse headers,
                             AsyncHttpRequest request) {
            this. = length;
            this. = emitter;
            this. = loadedFrom;
            this. = headers;
            this. = request;
        }
        DataEmitter emitter;
        long length;
        public DataEmitter getDataEmitter() {
            return ;
        }
        public long length() {
            return ;
        }
        int loadedFrom;
        public int loadedFrom() {
            return ;
        }
        HeadersResponse headers;
        public HeadersResponse getHeaders() {
            return ;
        }
        AsyncHttpRequest request;
        public AsyncHttpRequest getRequest() {
            return ;
        }
    }

    
returns a Future if this loader can handle a request as a stream. this implies that the stream is essentially non blocking... ie file or memory based.

Parameters:
ion
request
Returns:
    public Future<InputStreamload(Ion ionAsyncHttpRequest request);

    
returns a Future if this loader can handle a request otherwise it returns null, and Ion continues to the next loader.

Parameters:
ion
request
callback
Returns:
    public Future<DataEmitterload(Ion ionAsyncHttpRequest requestFutureCallback<LoaderEmittercallback);

    
returns a future if the laoder can handle the request as a bitmap otherwise it returns null

Parameters:
ion
key
uri
resizeWidth
resizeHeight
Returns:
    public Future<BitmapInfoloadBitmap(Context contextIon ionString keyString uriint resizeWidthint resizeHeightboolean animateGif);

    
Resolve a request into another request.

Parameters:
ion
request
Returns:
    public Future<AsyncHttpRequestresolve(Context contextIon ionAsyncHttpRequest request);
New to GrepCode? Check out our FAQ X