构造器和说明 |
---|
BytesResource(byte[] bytes) |
限定符和类型 | 方法和说明 |
---|---|
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
在接口中 Resource<byte[]>
@NonNull public byte[] get()
get
在接口中 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: