code: public synchronized void addTransferEncoding(String encoding) {
      throwIfImmutable();
      List<String> encodings = getTransferEncoding();
      if (encodings == null) {
        encodings = new ArrayList<>();
      }
  
      encodings.add(encoding);
  
      setDatasetMetadata(TRANSFER_ENCODING_KEY, encodings);
    }
docs: Convenience method to add a new transfer-encoding to a dataset