|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.bumptech.glide.util.ByteArrayPool
public final class ByteArrayPool
A pool for reusing byte arrays that produces and contains byte arrays of a fixed size.
Method Summary | |
---|---|
void |
clear()
Removes all byte arrays from the pool. |
static ByteArrayPool |
get()
Returns a constant singleton byte array pool. |
byte[] |
getBytes()
Returns a byte array by retrieving one from the pool if the pool is non empty or otherwise by creating a new byte array. |
boolean |
releaseBytes(byte[] bytes)
Adds the given byte array to the pool if it is the correct size and the pool is not full and returns true if the byte array was added and false otherwise. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static ByteArrayPool get()
public void clear()
public byte[] getBytes()
public boolean releaseBytes(byte[] bytes)
bytes
- The bytes to try to add to the pool.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |