static short getShortLE(byte[] memory, int index) {
        return (short) (memory[index] & 0xff | memory[index + 1] << 8);
    }
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