code: public static Map<String, String> readValues(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_VALUES.get()];
              int maxLength = info[InfoIndex.INFO_MAX_VALUE_LENGTH.get()] + 1;
              Map<String, String> values = new HashMap<>();
              for (int i = 0; i < count; i++) {
                  String valueName = fromByteArray(invoke(Methods.REG_ENUM_VALUE.get(), key.id, i, maxLength));
                  values.put(valueName, readValue(keyName, valueName));
              }
              return values;
          }
      }
docs: Returns a map of all the name-value pairs in the given key.
  
  @param keyName Name of the key to read all values from.
  @return {@link Map} of value name and value content pairs.
  @throws RegistryException