public final class ByteBufferCollector extends Object implements Recyclable
| 限定符和类型 | 方法和说明 |
|---|---|
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 在接口中 RecyclableCopyright © 2021. All rights reserved.