code: public ResponseDownloadResource toDownloadResource() {
          final ResponseDownloadResource resource = createResponseDownloadResource();
          if (contentType != null) {
              resource.contentType(contentType);
          }
          for (Entry<String, String[]> entry : headerMap.entrySet()) {
              resource.header(entry.getKey(), entry.getValue());
          }
          if (needsFileNameEncoding) {
              resource.encodeFileName(getHeaderFileNameEncoding()); // should be before content-disposition process
          }
          if (reservedHeaderContentDispositionAttachment) {
              resource.headerContentDispositionAttachment();
          }
          if (reservedHeaderContentDispositionInline) {
              resource.headerContentDispositionInline();
          }
          if (!returnAsEmptyBody && byteData == null && streamCall == null && zipStreamCall == null) {
              throwStreamByteDataInputStreamNotFoundException();
          }
          if (byteData != null) {
              resource.data(byteData);
          }
          if (streamCall != null) {
              if (contentLength != null) {
                  resource.stream(streamCall, contentLength);
              } else {
                  resource.stream(streamCall);
              }
          }
          if (zipStreamCall != null) {
              resource.zipStreamChunked(zipStreamCall);
          }
          if (returnAsEmptyBody) {
              resource.asEmptyBody();
          }
          return resource;
      }
docs: ===================