ByteBuf.slice

Returns a slice of this buffer's sub-region. Modifying the content of the returned buffer or this buffer affects each other's content while they maintain separate indexes and marks. This method does not modify {@code readerIndex} or {@code writerIndex} of this buffer. <p> Also be aware that this method will NOT call {@link #retain()} and so the reference count will NOT be increased.

  1. ByteBuf slice()
  2. ByteBuf slice(int index, int length)
    class ByteBuf
    abstract
    slice
    (
    int index
    ,
    int length
    )

Meta