Constructor and Description |
---|
BytesResource(byte[] bytes) |
Modifier and Type | Method and Description |
---|---|
byte[] |
get()
In most cases it will only be retrieved once (see linked methods).
|
Class<byte[]> |
getResourceClass()
Returns the
Class of the wrapped resource. |
int |
getSize()
Returns the size in bytes of the wrapped resource to use to determine how much of the memory
cache this resource uses.
|
void |
recycle()
Cleans up and recycles internal resources.
|
@NonNull public Class<byte[]> getResourceClass()
Resource
Class
of the wrapped resource.getResourceClass
in interface Resource<byte[]>
@NonNull public byte[] get()
get
in interface Resource<byte[]>
ResourceEncoder
,
ResourceTranscoder
,
SingleRequest.onResourceReady(com.bumptech.glide.load.engine.Resource<?>, com.bumptech.glide.load.DataSource)
public int getSize()
Resource
public void recycle()
Resource
It is only safe to call this method if there are no current resource consumers and if this method has not yet been called. Typically this occurs at one of two times: