public final class ByteBufferCollector extends Object implements Recyclable
| Modifier and Type | Method and Description |
|---|---|
static ByteBufferCollector |
allocate() |
static ByteBufferCollector |
allocate(int size) |
static ByteBufferCollector |
allocateByRecyclers() |
static ByteBufferCollector |
allocateByRecyclers(int size) |
int |
capacity() |
void |
expandAtMost(int atMostBytes) |
void |
expandIfNecessary() |
ByteBuffer |
getBuffer() |
boolean |
hasRemaining() |
void |
put(byte[] bs) |
void |
put(ByteBuffer buf) |
boolean |
recycle()
Recycle this instance.
|
void |
setBuffer(ByteBuffer buffer) |
static int |
threadLocalCapacity() |
static int |
threadLocalSize() |
public int capacity()
public void expandIfNecessary()
public void expandAtMost(int atMostBytes)
public boolean hasRemaining()
public static ByteBufferCollector allocate(int size)
public static ByteBufferCollector allocate()
public static ByteBufferCollector allocateByRecyclers(int size)
public static ByteBufferCollector allocateByRecyclers()
public static int threadLocalCapacity()
public static int threadLocalSize()
public void put(ByteBuffer buf)
public void put(byte[] bs)
public void setBuffer(ByteBuffer buffer)
public ByteBuffer getBuffer()
public boolean recycle()
Recyclablerecycle in interface RecyclableCopyright © 2024. All rights reserved.