ByteBuf.nioBuffers

Exposes this buffer's readable bytes as an NIO {@link ByteBuffer}'s. 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.

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

Detailed Description

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

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

Meta