diff --git a/buffer/src/main/java/io/netty/buffer/ByteBuf.java b/buffer/src/main/java/io/netty/buffer/ByteBuf.java index 30d71ea689..e2818c9a27 100644 --- a/buffer/src/main/java/io/netty/buffer/ByteBuf.java +++ b/buffer/src/main/java/io/netty/buffer/ByteBuf.java @@ -201,6 +201,9 @@ import java.nio.charset.UnsupportedCharsetException; *
* In case a completely fresh copy of an existing buffer is required, please * call {@link #copy()} method instead. + *
+ * Also be aware that obtaining derived buffers will NOT call {@link #retain()} and so the + * reference count will NOT be increased. * *
+ * Also be aware that this method will NOT call {@link #retain()} and so the
+ * reference count will NOT be increased.
*
* @param length the size of the new slice
*
@@ -1661,6 +1667,9 @@ public abstract class ByteBuf implements ReferenceCounted, Comparable
+ * Also be aware that this method will NOT call {@link #retain()} and so the
+ * reference count will NOT be increased.
*/
public abstract ByteBuf slice();
@@ -1670,6 +1679,9 @@ public abstract class ByteBuf implements ReferenceCounted, Comparable
+ * Also be aware that this method will NOT call {@link #retain()} and so the
+ * reference count will NOT be increased.
*/
public abstract ByteBuf slice(int index, int length);
@@ -1680,7 +1692,9 @@ public abstract class ByteBuf implements ReferenceCounted, Comparable
+ * The reader and writer marks will not be duplicated. Also be aware that this method will
+ * NOT call {@link #retain()} and so the reference count will NOT be increased.
*/
public abstract ByteBuf duplicate();