code: public static final long getLong(byte[] data, int offset)
     {
        if (data.length != 8)
        {
           throw new UnexpectedStructureException();
        }
  
        long result = 0;
        int i = offset;
        for (int shiftBy = 0; shiftBy < 64; shiftBy += 8)
        {
           result |= ((long) (data[i] & 0xff)) << shiftBy;
           ++i;
        }
        return result;
     }
docs: This method reads an eight byte integer from the input array.
  
  @param data the input array
  @param offset offset of integer data in the array
  @return integer value