public abstract class Decoder
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
protected static class |
Decoder.SOURCE |
Modifier and Type | Field and Description |
---|---|
protected int |
resourceId |
protected Decoder.SOURCE |
sourceType |
Constructor and Description |
---|
Decoder(Resources resources,
int resourceId) |
Decoder(Resources resources,
Uri uri) |
Modifier and Type | Method and Description |
---|---|
void |
createCache() |
protected abstract ImageSize |
decodeSize() |
protected static Bitmap |
fallbackCrop(Bitmap bitmap,
RectF slice,
int sampleSize) |
protected void |
finalize() |
abstract Bitmap |
getBitmap(int boundsWidth,
int boundsHeight,
boolean fitIntoBounds,
DrawableState state) |
abstract Bitmap |
getBitmap(RectF bounds,
RectF region) |
abstract Drawable |
getDrawable() |
java.io.InputStream |
getInputStream() |
protected static java.io.InputStream |
getInputStream(Uri uri) |
java.lang.String |
getPath() |
protected Resources |
getResources() |
ImageSize |
getSize() |
Uri |
getUri() |
boolean |
isStateful() |
abstract boolean |
isVector() |
void |
recycle() |
static Uri |
resourceToUri(Resources resources,
int resID) |
@DrawableRes protected int resourceId
protected final Decoder.SOURCE sourceType
public Decoder(@NonNull Resources resources, @DrawableRes @RawRes int resourceId)
public Decoder(@NonNull Resources resources, @NonNull Uri uri)
@WorkerThread public void createCache()
@NonNull protected abstract ImageSize decodeSize()
protected static Bitmap fallbackCrop(Bitmap bitmap, RectF slice, int sampleSize)
protected void finalize() throws java.lang.Throwable
finalize
in class java.lang.Object
java.lang.Throwable
@Nullable @WorkerThread public abstract Bitmap getBitmap(int boundsWidth, int boundsHeight, boolean fitIntoBounds, @Nullable DrawableState state)
@Nullable @WorkerThread public abstract Bitmap getBitmap(@NonNull RectF bounds, @NonNull RectF region)
@WorkerThread public abstract Drawable getDrawable()
@WorkerThread public java.io.InputStream getInputStream() throws java.io.FileNotFoundException
java.io.FileNotFoundException
@WorkerThread protected static java.io.InputStream getInputStream(Uri uri) throws java.io.FileNotFoundException
java.io.FileNotFoundException
public java.lang.String getPath()
protected Resources getResources()
@NonNull public final ImageSize getSize()
@NonNull public Uri getUri()
public boolean isStateful()
public abstract boolean isVector()
public void recycle()
@AnyThread public static Uri resourceToUri(Resources resources, int resID)