src/main/java/com/aliyun/oss/model/DownloadFileRequest.java [114:226]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    public List<String> getMatchingETagConstraints() {
        return matchingETagConstraints;
    }

    /**
     * Sets the ETag matching constraints (optional). The download only happens
     * if the specified ETag matches the source file's ETag. If ETag does not
     * match, returns the precondition failure (412)
     * 
     * @param eTagList
     *            The expected ETag list.
     */
    public void setMatchingETagConstraints(List<String> eTagList) {
        this.matchingETagConstraints.clear();
        if (eTagList != null && !eTagList.isEmpty()) {
            this.matchingETagConstraints.addAll(eTagList);
        }
    }

    public void clearMatchingETagConstraints() {
        this.matchingETagConstraints.clear();
    }

    /**
     * Gets the ETag non-matching constraints. The download only happens if the
     * specified ETag does not match the source file's ETag. If ETag matches,
     * returns the precondition failure (412)
     * 
     * @return The expected ETag list.
     */
    public List<String> getNonmatchingETagConstraints() {
        return nonmatchingEtagConstraints;
    }

    /**
     * Sets the ETag non-matching constraints. The download only happens if the
     * specified ETag does not match the source file's ETag. If ETag matches,
     * returns the precondition failure (412)
     * 
     * @param eTagList
     *            The expected ETag list. For now only the first ETag is used,
     *            though the parameter is the list.
     */
    public void setNonmatchingETagConstraints(List<String> eTagList) {
        this.nonmatchingEtagConstraints.clear();
        if (eTagList != null && !eTagList.isEmpty()) {
            this.nonmatchingEtagConstraints.addAll(eTagList);
        }
    }

    public void clearNonmatchingETagConstraints() {
        this.nonmatchingEtagConstraints.clear();
    }

    /**
     * Gets the unmodified since constraint.
     * 
     * @return The time threshold. If it's same or later than the actual
     *         modified time, download the file.
     */
    public Date getUnmodifiedSinceConstraint() {
        return unmodifiedSinceConstraint;
    }

    /**
     * Sets the unmodified since constraint.
     * 
     * @param date
     *            The time threshold. If it's same or later than the actual
     *            modified time, download the file.
     */
    public void setUnmodifiedSinceConstraint(Date date) {
        this.unmodifiedSinceConstraint = date;
    }

    /**
     * Gets the modified since constraint.
     * 
     * @return The time threshold. If it's earlier than the actual modified
     *         time, download the file.
     */
    public Date getModifiedSinceConstraint() {
        return modifiedSinceConstraint;
    }

    /**
     * Sets the modified since constraint.
     * 
     * @param date
     *            The time threshold. If it's earlier than the actual modified
     *            time, download the file.
     */
    public void setModifiedSinceConstraint(Date date) {
        this.modifiedSinceConstraint = date;
    }

    /**
     * Gets response headers to override.
     * 
     * @return The headers to override with.
     */
    public ResponseHeaderOverrides getResponseHeaders() {
        return responseHeaders;
    }

    /**
     * Sets response headers to override.
     * 
     * @param responseHeaders
     *            The headers to override with.
     */
    public void setResponseHeaders(ResponseHeaderOverrides responseHeaders) {
        this.responseHeaders = responseHeaders;
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



src/main/java/com/aliyun/oss/model/GetObjectRequest.java [182:300]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    public List<String> getMatchingETagConstraints() {
        return matchingETagConstraints;
    }

    /**
     * Sets the matching Etag constraints. If the first ETag returned matches
     * the object's ETag, the file would be downloaded. Otherwise, return
     * precondition failure (412).
     * 
     * @param eTagList
     *            The expected ETag list. OSS only supports one ETag.
     */
    public void setMatchingETagConstraints(List<String> eTagList) {
        this.matchingETagConstraints.clear();
        if (eTagList != null && !eTagList.isEmpty()) {
            this.matchingETagConstraints.addAll(eTagList);
        }
    }

    public void clearMatchingETagConstraints() {
        this.matchingETagConstraints.clear();
    }

    /**
     * Gets the non-matching Etag constraints. If the first ETag returned does
     * not match the object's ETag, the file would be downloaded. Currently OSS
     * only supports one ETag. Otherwise, return precondition failure (412).
     * 
     * @return The list of expected ETags (only the first one matters though).
     */
    public List<String> getNonmatchingETagConstraints() {
        return nonmatchingEtagConstraints;
    }

    /**
     * Sets the non-matching Etag constraints. If the first ETag returned does
     * not match the object's ETag, the file would be downloaded. Currently OSS
     * only supports one ETag. Otherwise, returns precondition failure (412).
     * 
     * @param eTagList
     *            The list of expected ETags (only the first one matters
     *            though).
     */
    public void setNonmatchingETagConstraints(List<String> eTagList) {
        this.nonmatchingEtagConstraints.clear();
        if (eTagList != null && !eTagList.isEmpty()) {
            this.nonmatchingEtagConstraints.addAll(eTagList);
        }
    }

    public void clearNonmatchingETagConstraints() {
        this.nonmatchingEtagConstraints.clear();
    }

    /**
     * Gets the unmodified since constraints. If the timestamp returned is equal
     * or later than the actual file's modified time, the file would be
     * downloaded. Otherwise, the download API returns precondition failure
     * (412).
     * 
     * @return The timestamp.
     */
    public Date getUnmodifiedSinceConstraint() {
        return unmodifiedSinceConstraint;
    }

    /**
     * Sets the unmodified since constraints. If the timestamp specified in date
     * parameter is equal or later than the actual file's modified time, the
     * file would be downloaded. Otherwise, the download API returns
     * precondition failure (412).
     * 
     * @param date
     *            The timestamp.
     */
    public void setUnmodifiedSinceConstraint(Date date) {
        this.unmodifiedSinceConstraint = date;
    }

    /**
     * Gets the modified since constraints. If the timestamp returned is earlier
     * than the actual file's modified time, the file would be downloaded.
     * Otherwise, the download API returns precondition failure (412).
     * 
     * @return “If-Modified-Since” timestamp.
     */
    public Date getModifiedSinceConstraint() {
        return modifiedSinceConstraint;
    }

    /**
     * Sets the modified since constraints. If the timestamp returned is earlier
     * than the actual file's modified time, the file would be downloaded.
     * Otherwise, the download API returns precondition failure (412).
     * 
     * @param date
     *            “If-Modified-Since” parameter.
     */
    public void setModifiedSinceConstraint(Date date) {
        this.modifiedSinceConstraint = date;
    }

    /**
     * Gets the response headers to override.
     * 
     * @return The response headers to override.
     */
    public ResponseHeaderOverrides getResponseHeaders() {
        return responseHeaders;
    }

    /**
     * Sets the response headers to override (optional).
     * 
     * @param responseHeaders
     *            The response headers to override.
     */
    public void setResponseHeaders(ResponseHeaderOverrides responseHeaders) {
        this.responseHeaders = responseHeaders;
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



