public final class ReadWriteBytesPool extends Object
| Modifier and Type | Class and Description |
|---|---|
static interface |
ReadWriteBytesPool.ThrowableBytesConsumer<T>
The interface for propper bytes buffer consuming.
|
| Modifier and Type | Method and Description |
|---|---|
<T> T |
borrow(@NonNull ReadWriteBytesPool.ThrowableBytesConsumer<T> consumer)
Borrows a byte buffer from the pool and sends it to the consumer.
|
static ReadWriteBytesPool |
getInstance()
Returns the singleton instance of the pool.
|
public static ReadWriteBytesPool getInstance()
public <T> T borrow(@NonNull
@NonNull ReadWriteBytesPool.ThrowableBytesConsumer<T> consumer)
consumer - acquired buffer consumer.Copyright © 2019 Infobip Ltd.. All rights reserved.