public class GifResourceEncoder extends Object implements ResourceEncoder<GifDrawable>
ResourceEncoder that can write
GifDrawable to cache.| Constructor and Description |
|---|
GifResourceEncoder(BitmapPool bitmapPool) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
encode(Resource<GifDrawable> resource,
OutputStream os)
Writes the given data to the given output stream and returns True if the write completed successfully and
should be committed.
|
String |
getId()
Returns an ID identifying any transformation this encoder may apply to the given data that will be mixed in to
the cache key.
|
public GifResourceEncoder(BitmapPool bitmapPool)
public boolean encode(Resource<GifDrawable> resource, OutputStream os)
Encoderencode in interface Encoder<Resource<GifDrawable>>resource - The data to write.os - The OutputStream to write the data to.public String getId()
EncoderIf the encoder does not transform the data in a way that significantly affects the cached result (ie performs no unusual compression or downsampling) an empty string is an appropriate id.
getId in interface Encoder<Resource<GifDrawable>>