readDirect
Apply block function on a ByteBuffer of readable bytes. The block function should return number of consumed bytes.
Return
number of bytes consumed
Apply block to a native pointer for reading from the buffer. Lambda should return number of bytes were read.
Return
number of bytes read