Java Byte Array Little Endian bytesLittleToLong(byte[] data, int start)

Here you can find the source of bytesLittleToLong(byte[] data, int start)

Description

bytes Little To Long

License

Apache License

Declaration

public static long bytesLittleToLong(byte[] data, int start) 

Method Source Code

//package com.java2s;
//License from project: Apache License 

public class Main {

    public static long bytesLittleToLong(byte[] data, int start) {
        long ret = 0;
        ret = 0x00000000000000ffL & data[start++];
        ret |= (0x00000000000000ffL & data[start++]) << 8;
        ret |= (0x00000000000000ffL & data[start++]) << 16;
        ret |= (0x00000000000000ffL & data[start++]) << 24;
        ret |= (0x00000000000000ffL & data[start++]) << 32;
        ret |= (0x00000000000000ffL & data[start++]) << 40;
        ret |= (0x00000000000000ffL & data[start++]) << 48;
        ret |= (0x00000000000000ffL & data[start++]) << 56;
        return ret;
    }//from w  ww  .j  a  va  2  s . com
}

Related

  1. bytesLE2ushorts(byte[] b)
  2. BytesLEToFloat(final byte[] value)
  3. BytesLEToShort(final byte[] buf)
  4. bytesLittleToFloat(byte[] data, int start)
  5. bytesLittleToShort(byte[] data, int start)