mayi-common/mayi-common-core/src/main/java/com/zf1976/mayi/common/core/util/ByteUtils.java
public static void toLittleEndian(final byte[] b, final long value, final int off, final int length) {
        long num = value;
        for (int i = 0; i < length; i++) {
            b[off + i] = (byte) (num & 0xff);
            num >>= 8;
        }
    }
/**
     * Inserts the given value into the array as a little endian
     * sequence of the given length starting at the given offset.
     *
     * @param b      the array to write into
     * @param value  the value to insert
     * @param off    the offset into the array that receives the first byte
     * @param length the number of bytes to use to represent the value
     */
Inserts the given value into the array as a little endian
sequence of the given length starting at the given offset.

@param b      the array to write into
@param value  the value to insert
@param off    the offset into the array that receives the first byte
@param length the number of bytes to use to represent the value
Inserts the given value into the array as a little endian sequence of the given length starting at the given offset . @param b the array to write into @param value the value to insert @param off the offset into the array that receives the first byte @param length the number of bytes to use to represent the value
public static void toLittleEndian(final byte[] b, final long value, final int off, final int length) {
        long num = value;
        for (int i = 0; i < length; i++) {
            b[off + i] = (byte) (num & 0xff);
            num >>= 8;
        }
    }
public static void toLittleEndian ( final byte [ ] b , final long value , final int off , final int length ) { long num = value ; for ( int i = 0 ; i < length ; i ++ ) { b [ off + i ] = ( byte ) ( num & 0xff ) ; num >>= 8 ; } }
Inserts the given value into the array as a little endian
 sequence of the given length starting at the given offset.
Inserts the given value into the array as a little endian sequence of the given length starting at the given offset .