public final class ByteBufPair
extends io.netty.util.AbstractReferenceCounted
| Modifier and Type | Class and Description |
|---|---|
static class |
ByteBufPair.CopyingEncoder |
static class |
ByteBufPair.Encoder |
| Modifier and Type | Field and Description |
|---|---|
static ByteBufPair.CopyingEncoder |
COPYING_ENCODER |
static ByteBufPair.Encoder |
ENCODER |
| Modifier and Type | Method and Description |
|---|---|
static io.netty.buffer.ByteBuf |
coalesce(ByteBufPair pair) |
protected void |
deallocate() |
static ByteBufPair |
get(io.netty.buffer.ByteBuf b1,
io.netty.buffer.ByteBuf b2)
Get a new
ByteBufPair from the pool and assign 2 buffers to it. |
io.netty.buffer.ByteBuf |
getFirst() |
io.netty.buffer.ByteBuf |
getSecond() |
int |
readableBytes() |
io.netty.util.ReferenceCounted |
touch(Object hint) |
public static final ByteBufPair.Encoder ENCODER
public static final ByteBufPair.CopyingEncoder COPYING_ENCODER
public static ByteBufPair get(io.netty.buffer.ByteBuf b1, io.netty.buffer.ByteBuf b2)
ByteBufPair from the pool and assign 2 buffers to it.
The buffers b1 and b2 lifecycles are now managed by the ByteBufPair:
when the ByteBufPair is deallocated, b1 and b2 will be released as well.
b1 - b2 - public io.netty.buffer.ByteBuf getFirst()
public io.netty.buffer.ByteBuf getSecond()
public int readableBytes()
public static io.netty.buffer.ByteBuf coalesce(ByteBufPair pair)
protected void deallocate()
deallocate in class io.netty.util.AbstractReferenceCountedpublic io.netty.util.ReferenceCounted touch(Object hint)
Copyright © 2017–2022 Apache Software Foundation. All rights reserved.