code: private static int channelRead(ReadableByteChannel channel,
                                   ByteBuffer buffer) throws IOException {
  
      return (buffer.remaining() <= NIO_BUFFER_LIMIT) ?
             channel.read(buffer) : channelIO(channel, null, buffer);
    }
docs: This is a wrapper around {@link ReadableByteChannel#read(ByteBuffer)}.
  If the amount of data is large, it writes to channel in smaller chunks.
  This is to avoid jdk from creating many direct buffers as the size of
  ByteBuffer increases. There should not be any performance degredation.
  
  @see ReadableByteChannel#read(ByteBuffer)