Package io.netty.buffer
Interface ByteBufHolder
-
- All Superinterfaces:
io.netty.util.ReferenceCounted
- All Known Implementing Classes:
DefaultByteBufHolder
public interface ByteBufHolder extends io.netty.util.ReferenceCounted
A packet which is send or receive.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description ByteBuf
content()
Return the data which is held by thisByteBufHolder
.ByteBufHolder
copy()
Creates a deep copy of thisByteBufHolder
.ByteBufHolder
duplicate()
Duplicates thisByteBufHolder
.ByteBufHolder
replace(ByteBuf content)
Returns a newByteBufHolder
which contains the specifiedcontent
.ByteBufHolder
retain()
ByteBufHolder
retain(int increment)
ByteBufHolder
retainedDuplicate()
Duplicates thisByteBufHolder
.ByteBufHolder
touch()
ByteBufHolder
touch(Object hint)
-
-
-
Method Detail
-
content
ByteBuf content()
Return the data which is held by thisByteBufHolder
.
-
copy
ByteBufHolder copy()
Creates a deep copy of thisByteBufHolder
.
-
duplicate
ByteBufHolder duplicate()
Duplicates thisByteBufHolder
. Be aware that this will not automatically callretain()
.
-
retainedDuplicate
ByteBufHolder retainedDuplicate()
Duplicates thisByteBufHolder
. This method returns a retained duplicate unlikeduplicate()
.- See Also:
ByteBuf.retainedDuplicate()
-
replace
ByteBufHolder replace(ByteBuf content)
Returns a newByteBufHolder
which contains the specifiedcontent
.
-
retain
ByteBufHolder retain()
- Specified by:
retain
in interfaceio.netty.util.ReferenceCounted
-
retain
ByteBufHolder retain(int increment)
- Specified by:
retain
in interfaceio.netty.util.ReferenceCounted
-
touch
ByteBufHolder touch()
- Specified by:
touch
in interfaceio.netty.util.ReferenceCounted
-
touch
ByteBufHolder touch(Object hint)
- Specified by:
touch
in interfaceio.netty.util.ReferenceCounted
-
-