channelWrite

This is a wrapper around WritableByteChannel.write(java.nio.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
buffer increases. This also minimizes extra copies in NIO layer
as a result of multiple write operations required to write a large
buffer.

channelRead

This is a wrapper around ReadableByteChannel.read(java.nio.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.