static int getUnsignedMediumLE(byte[] memory, int index) {
        return memory[index] & 0xff | (memory[index + 1] & 0xff) << 8 | (memory[index + 2] & 0xff) << 16;
    }
Utility class for heap buffers.

Forked from <a href="https://github.com/netty/netty">Netty</a>.
jraft-core/src/main/java/com/alipay/sofa/jraft/util/HeapByteBufUtil.java