Overloaded method which sets an attachment on account of name and {@link DataSource}.

@param name The name of the attachment (eg. 'filename.ext').
@param filedata The attachment data.
173197
public void addAttachment(final String name, final DataSource filedata) {
		attachments.add(new AttachmentResource(name, filedata));
	}
1149374
public void declareRequestedFieldname(String name) {
        if (name.endsWith(".*")) {
            stringSetValues.put(name, new HashMap<>());
            stringSetPrefixes.put(name.substring(0, name.length() - 1), name);
        }
    }
844743
public void setName(String name) throws ApplicationException {
	if (name == null) return;
	this.name = name.trim();
	if (name.length() == 0) throw new ApplicationException("invalid attribute definition", "attribute [name] can't be a empty string");
    }
517246
public void setAttachmentsInformation(java.util.Collection<AttachmentInformation> attachmentsInformation) {
        if (attachmentsInformation == null) {
            this.attachmentsInformation = null;
            return;
        }

        this.attachmentsInformation = new com.amazonaws.internal.SdkInternalList<AttachmentInformation>(attachmentsInformation);
    }
245675
public static final void fileDump(String fileName, byte[] data)
   {
      try
      {
         FileOutputStream os = new FileOutputStream(fileName);
         os.write(data);
         os.close();
      }

      catch (IOException ex)
      {
         ex.printStackTrace();
      }
   }
636298
public void setName(final String name) {
		this.name = name;
		setHumanName(JKMessage.get(name, true));
	}
1006763
public void setAttachmentSet(java.util.Collection<AttachmentDetails> attachmentSet) {
        if (attachmentSet == null) {
            this.attachmentSet = null;
            return;
        }

        this.attachmentSet = new com.amazonaws.internal.SdkInternalList<AttachmentDetails>(attachmentSet);
    }
993892
public function setAttribute($name, $data)
    {
        // new fields are detected to *prevent the order of fields*
        // from changing during data processes.

        $attributes = array_keys($this->attributes);
        $cntAttribs = count($attributes);
        if (! in_array($name, $attributes)) {
            // new field detected, store index for correct order
            $this->sortedFields[$cntAttribs-1] = $name;
        }

        if (in_array($name, $this->relations) || method_exists($this, $name)) {
            // subordinate DTO data passed (one-to-one, one-to-many, etc.)
            // build the linked Model using Relationship configuration.
            $this->related[$name] = $this->resolveRelationship($name, $data);
            $this->attributes[$name] = $data; // attributes property contains scalar data
        }
        elseif (empty($this->fillable) || in_array($name, $this->getFields())) {
            // attribute is fillable or any attribute is fillable.
            $this->attributes[$name] = $data;
        }

        // get the dot notation for the said `name` alias (the dot notation is the full path).
        $dotNotation = isset($this->fillable[$name]) ? $this->fillable[$name] : $name;
        $this->dotAttributes[$dotNotation] = $data;

        return $this;
    }
560574
public void setCompressedData(byte[] compressedData) {
		if (compressedData != null) {
			this.compressedData = Arrays.copyOf(compressedData, compressedData.length);
		}
	}
200865
public void setName(String name) {

    if (name == null || name.trim().length() == 0) {
      throw new IllegalArgumentException("Job name cannot be empty.");
    }

    this.name = name;
  }
1275621
public void setImageUrlAttribute(String name, String value) {
		ensureValue();
		Attribute attribute = new ImageUrlAttribute(value);
		attribute.setEditable(isEditable(name));
		getValue().getAllAttributes().put(name, attribute);
	}
1035967
public static void setFileDownloadHeader(final HttpServletResponse response, final String filename) {
		// 中文文件名支持
		String encodedFilename = Encodes.urlEncode(filename);
		response.setHeader(HttpHeaders.CONTENT_DISPOSITION, "attachment; filename=\"" + encodedFilename + '\"');
	}
511390
public static Attachment create(@NonNull String data, @NonNull String type, @Nullable String folder, @Nullable String name) {
        return new Attachment(ContentData.create(data, type, name), folder, type);
    }
620033
public void setProperty( String name, String value ) throws OdaException
	{
		// do nothing; assumes no data set query property
		properties.put(name, value);
	}
278943
public E attachment(byte[] attachment, String name) {
        attachments.put(name, attachment);
        return getThis();
    }
1226786
public void setName(String name) {
        this.name = name;

        List<Token> tokens = Tokenizer.tokenize(name, true);
        int tokenCount = 0;

        for (Token t : tokens) {
            if (t.getType() != TokenType.TEXT) {
                tokenCount++;
            }
        }

        if (tokenCount > 0) {
            this.nameTokens = tokens.toArray(new Token[0]);
        } else {
            this.nameTokens = null;
        }
    }
663049
public RequestBuilder<Resource> set(final String name, final ContentBody contentBody) {
		if(contentBody != null)
			files.put(name, contentBody);
		else
			files.remove(name);
		return this;
	}