ByteBuf.nioBufferCount

Returns the maximum number of NIO {@link ByteBuffer}s that consist this buffer. Note that {@link #nioBuffers()} or {@link #nioBuffers(int, int)} might return a less number of {@link ByteBuffer}s.

@return {@code -1} if this buffer has no underlying {@link ByteBuffer}. the number of the underlying {@link ByteBuffer}s if this buffer has at least one underlying {@link ByteBuffer}. Note that this method does not return {@code 0} to avoid confusion.

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

class ByteBuf
abstract
int
nioBufferCount
()

Meta