public class DownloadFileRequest extends GenericRequest
NOOP
构造器和说明 |
---|
DownloadFileRequest(String bucketName,
String key) |
DownloadFileRequest(String bucketName,
String key,
String downloadFile,
long partSize) |
DownloadFileRequest(String bucketName,
String key,
String downloadFile,
long partSize,
int taskNum,
boolean enableCheckpoint) |
DownloadFileRequest(String bucketName,
String key,
String downloadFile,
long partSize,
int taskNum,
boolean enableCheckpoint,
String checkpointFile) |
限定符和类型 | 方法和说明 |
---|---|
void |
clearMatchingETagConstraints() |
void |
clearNonmatchingETagConstraints() |
String |
getCheckpointFile() |
String |
getDownloadFile() |
List<String> |
getMatchingETagConstraints()
Gets the ETag matching constraints.
|
Date |
getModifiedSinceConstraint()
Gets the modified since constraint.
|
List<String> |
getNonmatchingETagConstraints()
Gets the ETag non-matching constraints.
|
long |
getPartSize() |
long[] |
getRange()
Gets the range of the object to download.
|
ResponseHeaderOverrides |
getResponseHeaders()
Gets response headers to override.
|
int |
getTaskNum() |
String |
getTempDownloadFile() |
int |
getTrafficLimit()
Gets traffic limit speed, its unit is bit/s
|
Date |
getUnmodifiedSinceConstraint()
Gets the unmodified since constraint.
|
boolean |
isEnableCheckpoint() |
void |
setCheckpointFile(String checkpointFile) |
void |
setDownloadFile(String downloadFile) |
void |
setEnableCheckpoint(boolean enableCheckpoint) |
void |
setMatchingETagConstraints(List<String> eTagList)
Sets the ETag matching constraints (optional).
|
void |
setModifiedSinceConstraint(Date date)
Sets the modified since constraint.
|
void |
setNonmatchingETagConstraints(List<String> eTagList)
Sets the ETag non-matching constraints.
|
void |
setPartSize(long partSize) |
void |
setRange(long start,
long end)
Sets the range of the object to download (optional).
|
void |
setResponseHeaders(ResponseHeaderOverrides responseHeaders)
Sets response headers to override.
|
void |
setTaskNum(int taskNum) |
void |
setTrafficLimit(int trafficLimit)
Sets traffic limit speed, its unit is bit/s
|
void |
setUnmodifiedSinceConstraint(Date date)
Sets the unmodified since constraint.
|
getBucketName, getKey, getRequestPayer, getVersionId, setBucketName, setKey, setRequestPayer, setVersionId, withBucketName, withKey, withRequestPayer, withVersionId
public DownloadFileRequest(String bucketName, String key, String downloadFile, long partSize)
public DownloadFileRequest(String bucketName, String key, String downloadFile, long partSize, int taskNum, boolean enableCheckpoint)
public long getPartSize()
public void setPartSize(long partSize)
public int getTaskNum()
public void setTaskNum(int taskNum)
public String getDownloadFile()
public String getTempDownloadFile()
public void setDownloadFile(String downloadFile)
public boolean isEnableCheckpoint()
public void setEnableCheckpoint(boolean enableCheckpoint)
public String getCheckpointFile()
public void setCheckpointFile(String checkpointFile)
public List<String> getMatchingETagConstraints()
public void setMatchingETagConstraints(List<String> eTagList)
eTagList
- The expected ETag list.public void clearMatchingETagConstraints()
public List<String> getNonmatchingETagConstraints()
public void setNonmatchingETagConstraints(List<String> eTagList)
eTagList
- The expected ETag list. For now only the first ETag is used,
though the parameter is the list.public void clearNonmatchingETagConstraints()
public Date getUnmodifiedSinceConstraint()
public void setUnmodifiedSinceConstraint(Date date)
date
- The time threshold. If it's same or later than the actual
modified time, download the file.public Date getModifiedSinceConstraint()
public void setModifiedSinceConstraint(Date date)
date
- The time threshold. If it's earlier than the actual modified
time, download the file.public ResponseHeaderOverrides getResponseHeaders()
public void setResponseHeaders(ResponseHeaderOverrides responseHeaders)
responseHeaders
- The headers to override with.public void setTrafficLimit(int trafficLimit)
public int getTrafficLimit()
public long[] getRange()
public void setRange(long start, long end)
start
- Start position
When the start is non-negative, it means the starting position to download. When the start is -1, it means the range is determined by the end only and the end could not be -1. For example, when start is -1 and end is 100. It means the download range will be the last 100 bytes.
end
- End position
When the end is non-negative, it means the ending position to download. When the end is -1, it means the range is determined by the start only and the start could not be -1. For example, when end is -1 and start is 100. It means the download range will be all exception first 100 bytes.
Copyright © 2019. All Rights Reserved.