Clarify ByteBuf.duplicate() semantics.

Motivation:

From the javadocs of ByteBuf.duplicate() it is not clear if the reader and writer marks will be duplicated.

Modifications:

Add sentence to clarify that marks will not be duplicated.

Result:

Clear semantics.
This commit is contained in:
Norman Maurer 2015-05-11 20:23:04 +02:00
parent 9d568586db
commit 33e443e71a

View File

@ -1680,6 +1680,7 @@ public abstract class ByteBuf implements ReferenceCounted, Comparable<ByteBuf> {
* This method is identical to {@code buf.slice(0, buf.capacity())}. * This method is identical to {@code buf.slice(0, buf.capacity())}.
* This method does not modify {@code readerIndex} or {@code writerIndex} of * This method does not modify {@code readerIndex} or {@code writerIndex} of
* this buffer. * this buffer.
* The reader and writer marks will not be duplicated.
*/ */
public abstract ByteBuf duplicate(); public abstract ByteBuf duplicate();