Clean up expired docs. (#9756)
Motivation: Since the `extractFrame` has used `retainedSlice` to avoid memory copy, we should clean this doc that was expired. Result: Better doc.
This commit is contained in:
parent
86a533576f
commit
d13ac5290a
@ -494,14 +494,6 @@ public class LengthFieldBasedFrameDecoder extends ByteToMessageDecoder {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Extract the sub-region of the specified buffer.
|
* Extract the sub-region of the specified buffer.
|
||||||
* <p>
|
|
||||||
* If you are sure that the frame and its content are not accessed after
|
|
||||||
* the current {@link #decode(ChannelHandlerContext, ByteBuf)}
|
|
||||||
* call returns, you can even avoid memory copy by returning the sliced
|
|
||||||
* sub-region (i.e. <tt>return buffer.slice(index, length)</tt>).
|
|
||||||
* It's often useful when you convert the extracted frame into an object.
|
|
||||||
* Refer to the source code of {@link ObjectDecoder} to see how this method
|
|
||||||
* is overridden to avoid memory copy.
|
|
||||||
*/
|
*/
|
||||||
protected ByteBuf extractFrame(ChannelHandlerContext ctx, ByteBuf buffer, int index, int length) {
|
protected ByteBuf extractFrame(ChannelHandlerContext ctx, ByteBuf buffer, int index, int length) {
|
||||||
return buffer.retainedSlice(index, length);
|
return buffer.retainedSlice(index, length);
|
||||||
|
Loading…
Reference in New Issue
Block a user