code: public static long byteArrayToLongLE( byte[] data ) {
          if (data == null)
              return 0x0;
          long accum = 0;
          int shiftBy = 0;
          for( byte b : data ) {
              accum |= (long) (b & 0xff) << shiftBy;
              shiftBy += 8;
          }
          return accum;
      }
docs: Convert a byte array to an long (little endian).
  
  @param data the byte array to convert.
  @return the long.