ByteBuf.nioBuffers

Exposes this buffer's bytes as an NIO {@link ByteBuffer}'s for the specified index and length The returned buffer either share or contains the copied content of this buffer, while changing the position and limit of the returned NIO buffer does not affect the indexes and marks of this buffer. This method does not modify {@code readerIndex} or {@code writerIndex} of this buffer. Please note that the returned NIO buffer will not see the changes of this buffer if this buffer is a dynamic buffer and it adjusted its capacity.

@throws UnsupportedOperationException if this buffer cannot create a {@link ByteBuffer} that shares the content with itself

@see #nioBufferCount() @see #nioBuffer() @see #nioBuffer(int, int)

  1. ByteBuffer[] nioBuffers()
  2. ByteBuffer[] nioBuffers(int index, int length)
    class ByteBuf
    abstract
    ByteBuffer[]
    nioBuffers
    (
    int index
    ,
    int length
    )

Meta