Package io.netty.buffer
Interface ByteBufHolder
- All Superinterfaces:
ReferenceCounted
- All Known Subinterfaces:
Attribute
,BulkStringRedisContent
,DnsRawRecord
,FileUpload
,FullBinaryMemcacheRequest
,FullBinaryMemcacheResponse
,FullHttpMessage
,FullHttpRequest
,FullHttpResponse
,FullMemcacheMessage
,Http2DataFrame
,Http2GoAwayFrame
,Http2UnknownFrame
,HttpContent
,HttpData
,LastBulkStringRedisContent
,LastHttpContent
,LastMemcacheContent
,LastSmtpContent
,LastStompContentSubframe
,MemcacheContent
,PemEncoded
,SmtpContent
,SpdyDataFrame
,StompContentSubframe
,StompFrame
- All Known Implementing Classes:
AbstractDiskHttpData
,AbstractHttpData
,AbstractMemoryHttpData
,AbstractMixedHttpData
,BinaryWebSocketFrame
,CloseWebSocketFrame
,ComposedLastHttpContent
,ContinuationWebSocketFrame
,DatagramPacket
,DefaultBulkStringRedisContent
,DefaultByteBufHolder
,DefaultDnsRawRecord
,DefaultFullBinaryMemcacheRequest
,DefaultFullBinaryMemcacheResponse
,DefaultFullHttpRequest
,DefaultFullHttpResponse
,DefaultHttp2DataFrame
,DefaultHttp2GoAwayFrame
,DefaultHttp2UnknownFrame
,DefaultHttpContent
,DefaultLastBulkStringRedisContent
,DefaultLastHttpContent
,DefaultLastMemcacheContent
,DefaultLastSmtpContent
,DefaultLastStompContentSubframe
,DefaultMemcacheContent
,DefaultSmtpContent
,DefaultSpdyDataFrame
,DefaultStompContentSubframe
,DefaultStompFrame
,DiskAttribute
,DiskFileUpload
,DomainDatagramPacket
,FullBulkStringRedisMessage
,HAProxySSLTLV
,HAProxyTLV
,HttpObjectAggregator.AggregatedFullHttpMessage
,HttpObjectAggregator.AggregatedFullHttpRequest
,HttpObjectAggregator.AggregatedFullHttpResponse
,HttpPostRequestEncoder.WrappedFullHttpRequest
,MemoryAttribute
,MemoryFileUpload
,MixedAttribute
,MixedFileUpload
,MqttPublishMessage
,PemPrivateKey
,PemValue
,PemX509Certificate
,PingWebSocketFrame
,PongWebSocketFrame
,SegmentedDatagramPacket
,SegmentedDatagramPacket
,TextWebSocketFrame
,WebSocketFrame
A packet which is send or receive.
-
Method Summary
Modifier and TypeMethodDescriptioncontent()
Return the data which is held by thisByteBufHolder
.copy()
Creates a deep copy of thisByteBufHolder
.Duplicates thisByteBufHolder
.Returns a newByteBufHolder
which contains the specifiedcontent
.retain()
Increases the reference count by1
.retain
(int increment) Increases the reference count by the specifiedincrement
.Duplicates thisByteBufHolder
.touch()
Records the current access location of this object for debugging purposes.Records the current access location of this object with an additional arbitrary information for debugging purposes.Methods inherited from interface io.netty.util.ReferenceCounted
refCnt, release, release
-
Method Details
-
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:
-
replace
Returns a newByteBufHolder
which contains the specifiedcontent
. -
retain
ByteBufHolder retain()Description copied from interface:ReferenceCounted
Increases the reference count by1
.- Specified by:
retain
in interfaceReferenceCounted
-
retain
Description copied from interface:ReferenceCounted
Increases the reference count by the specifiedincrement
.- Specified by:
retain
in interfaceReferenceCounted
-
touch
ByteBufHolder touch()Description copied from interface:ReferenceCounted
Records the current access location of this object for debugging purposes. If this object is determined to be leaked, the information recorded by this operation will be provided to you viaResourceLeakDetector
. This method is a shortcut totouch(null)
.- Specified by:
touch
in interfaceReferenceCounted
-
touch
Description copied from interface:ReferenceCounted
Records the current access location of this object with an additional arbitrary information for debugging purposes. If this object is determined to be leaked, the information recorded by this operation will be provided to you viaResourceLeakDetector
.- Specified by:
touch
in interfaceReferenceCounted
-