public static interface RecvByteBufAllocator.Handle
限定符和类型 | 方法和说明 |
---|---|
ByteBuf |
allocate(ByteBufAllocator alloc)
Creates a new receive buffer whose capacity is probably large enough to read all inbound data and small
enough not to waste its space.
|
int |
guess()
Similar to
allocate(ByteBufAllocator) except that it does not allocate anything but just tells the
capacity. |
void |
record(int actualReadBytes)
Records the the actual number of read bytes in the previous read operation so that the allocator allocates
the buffer with potentially more correct capacity.
|
ByteBuf allocate(ByteBufAllocator alloc)
int guess()
allocate(ByteBufAllocator)
except that it does not allocate anything but just tells the
capacity.void record(int actualReadBytes)
actualReadBytes
- the actual number of read bytes in the previous read operation