mayi-common/mayi-common-core/src/main/java/com/zf1976/mayi/common/core/util/ByteUtils.java
public static long fromLittleEndian(final byte[] bytes, final int off, final int length) {
        checkReadLength(length);
        long l = 0;
        for (int i = 0; i < length; i++) {
            l |= (bytes[off + i] & 0xffL) << (8 * i);
        }
        return l;
    }
/**
     * Reads the given byte array as a little endian long.
     *
     * @param bytes  the byte array to convert
     * @param off    the offset into the array that starts the value
     * @param length the number of bytes representing the value
     * @return the number read
     * @throws IllegalArgumentException if len is bigger than eight
     */
Reads the given byte array as a little endian long.
Reads the given byte array as a little endian long .
public static long fromLittleEndian(final byte[] bytes, final int off, final int length) {
        checkReadLength(length);
        long l = 0;
        for (int i = 0; i < length; i++) {
            l |= (bytes[off + i] & 0xffL) << (8 * i);
        }
        return l;
    }
public static long fromLittleEndian ( final byte [ ] bytes , final int off , final int length ) { checkReadLength ( length ) ; long l = 0 ; for ( int i = 0 ; i < length ; i ++ ) { l |= ( bytes [ off + i ] & 0xffL ) << ( 8 * i ) ; } return l ; }
Reads the given byte array as a little endian long.
Reads the given byte array as a little endian long .