code: private static Object[] keyParts(String fullKeyName) throws RegistryException {
          int x = fullKeyName.indexOf(REG_PATH_SEPARATOR);
          String hiveName = x >= 0 ? fullKeyName.substring(0, x) : fullKeyName;
          String keyName = x >= 0 ? fullKeyName.substring(x + 1) : "";
          if (Hive.getHive(hiveName) == null) {
              throw new RegistryException("Unknown registry hive: " + hiveName, null);
          }
          Integer hiveKey = Hive.getHive(hiveName).getId();
          return new Object[]{hiveKey, toByteArray(keyName)};
      }
docs: Splits a path such as HKEY_LOCAL_MACHINE\Software\Microsoft into a pair
  of values used by the underlying API: An integer hive constant and a byte
  array of the key path within that hive.
  
  @param fullKeyName Key name to split in its single keys.
  @return Array with the hive key as first element and a following byte
  array for each key name as second element.