public static ByteBuffer allocateDirect(int cap) {
        ByteBuffer bb = ByteBuffer.allocateDirect(cap);
        // It make operation faster, but kill the cross platform ability.
        bb.order(ByteOrder.nativeOrder());
        return bb;
    }
Allocate direct memory with cap len.
All DirectByteBuffer in this project should be allocated from this method.
indexr-common/src/main/java/io/indexr/util/ByteBufferUtil.java