docs: public Optional<Charset> charset() {
      ImmutableSet<String> charsetValues = ImmutableSet.copyOf(parameters.get(CHARSET_ATTRIBUTE));
      switch (charsetValues.size()) {
        case 0:
          return Optional.absent();
        case 1:
          return Optional.of(Charset.forName(Iterables.getOnlyElement(charsetValues)));
        default:
          throw new IllegalStateException("Multiple charset values defined: " + charsetValues);
      }
    }