code: public Set<String> names() {
          TreeSet<String> result = new TreeSet<>(String.CASE_INSENSITIVE_ORDER);
          for (int i = 0, size = size(); i < size; i++) {
              result.add(name(i));
          }
          return Collections.unmodifiableSet(result);
      }
docs: Returns an immutable case-insensitive set of header names.