code: public static List<String> readSubkeys(String keyName) throws RegistryException {
          try (Key key = Key.open(keyName, KEY_READ)) {
              int[] info = invoke(Methods.REG_QUERY_INFO_KEY.get(), key.id);
              checkError(info[InfoIndex.INFO_ERROR_CODE.get()]);
              int count = info[InfoIndex.INFO_COUNT_KEYS.get()];
              int maxLength = info[InfoIndex.INFO_MAX_KEY_LENGTH.get()] + 1;
              List<String> subkeys = new ArrayList<>(count);
              for (int i = 0; i < count; i++) {
                  subkeys.add(fromByteArray(invoke(Methods.REG_ENUM_KEY_EX.get(), key.id, i, maxLength)));
              }
              return subkeys;
          }
      }
docs: Returns a list of the names of all the subkeys of a key.
  
  @param keyName Key name to read all subkeys from.
  @return {@link List} of key names directly contained in the specified
  key.
  @throws RegistryException