FileDocCategorySizeDatePackage
ResourceRequestKey.javaAPI DocAndroid 5.1 API2358Thu Mar 12 22:22:50 GMT 2015com.android.bitmap

ResourceRequestKey

public class ResourceRequestKey extends Object implements RequestKey
Simple RequestKey for decoding from a resource id.

Fields Summary
private android.content.res.Resources
mResources
private int
mResId
Constructors Summary
private ResourceRequestKey(android.content.res.Resources res, int resId)

        mResources = res;
        mResId = resId;
    
Methods Summary
public CancelablecreateFileDescriptorFactoryAsync(RequestKey requestKey, Callback callback)

        return null;
    
public java.io.InputStreamcreateInputStream()

        return mResources.openRawResource(mResId);
    
public booleanequals(java.lang.Object o)

        if (this == o) {
            return true;
        }
        if (o == null || getClass() != o.getClass()) {
            return false;
        }

        ResourceRequestKey that = (ResourceRequestKey) o;

        if (mResId != that.mResId) {
            return false;
        }

        return true;
    
public static com.android.bitmap.ResourceRequestKeyfrom(android.content.res.Resources res, int resId)
Create a new request key with the given resource id. A resId of 0 will return a null request key.

        if (resId != 0) {
            return new ResourceRequestKey(res, resId);
        }
        return null;
    
public booleanhasOrientationExif()

        return false;
    
public inthashCode()

        return mResId;
    
public java.lang.StringtoString()

        return String.format("ResourceRequestKey: %d", mResId);