com.facebook.imagepipeline.memory.PooledByteBuffer |
A 'pooled' byte-buffer abstraction. Represents an immutable sequence of bytes stored off the java heap.
Nested Classes | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
class | PooledByteBuffer.ClosedException | Exception indicating that the PooledByteBuffer is closed |
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
abstract void |
close()
Close this PooledByteBuffer and release all underlying resources
| ||||||||||
abstract long | getNativePtr() | ||||||||||
abstract boolean |
isClosed()
Check if this instance has already been closed
| ||||||||||
abstract void |
read(int offset, byte[] buffer, int bufferOffset, int length)
Read consecutive bytes.
| ||||||||||
abstract byte |
read(int offset)
Read byte at given offset
| ||||||||||
abstract int |
size()
Get the size of the byte buffer
|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
![]() | |||||||||||
![]() |
Close this PooledByteBuffer and release all underlying resources
Check if this instance has already been closed
Read consecutive bytes.
offset | the position in the PooledByteBuffer of the first byte to read |
---|---|
buffer | the byte array where read bytes will be copied to |
bufferOffset | the position within the buffer of the first copied byte |
length | number of bytes to copy |
Read byte at given offset
Get the size of the byte buffer