public class GetObjectRequest extends GenericRequest
NOOP
构造器和说明 |
---|
GetObjectRequest(String bucketName,
String key)
Constructor
|
GetObjectRequest(URL absoluteUrl,
Map<String,String> requestHeaders)
Constructor with presigned Url and user's custom headers.
|
限定符和类型 | 方法和说明 |
---|---|
void |
clearMatchingETagConstraints() |
void |
clearNonmatchingETagConstraints() |
URL |
getAbsoluteUri() |
List<String> |
getMatchingETagConstraints()
Gets the matching Etag constraints.
|
Date |
getModifiedSinceConstraint()
Gets the modified since constraints.
|
List<String> |
getNonmatchingETagConstraints()
Gets the non-matching Etag constraints.
|
String |
getProcess() |
long[] |
getRange()
Gets the range of the object to download.
|
ResponseHeaderOverrides |
getResponseHeaders()
Gets the response headers to override.
|
Date |
getUnmodifiedSinceConstraint()
Gets the unmodified since constraints.
|
boolean |
isUseUrlSignature() |
void |
setAbsoluteUri(URL absoluteUri) |
void |
setMatchingETagConstraints(List<String> eTagList)
Sets the matching Etag constraints.
|
void |
setModifiedSinceConstraint(Date date)
Sets the modified since constraints.
|
void |
setNonmatchingETagConstraints(List<String> eTagList)
Sets the non-matching Etag constraints.
|
void |
setProcess(String process) |
void |
setRange(long start,
long end)
Sets the range of the object to download (optional).
|
void |
setResponseHeaders(ResponseHeaderOverrides responseHeaders)
Sets the response headers to override (optional).
|
void |
setUnmodifiedSinceConstraint(Date date)
Sets the unmodified since constraints.
|
void |
setUseUrlSignature(boolean useUrlSignature) |
GetObjectRequest |
withRange(long start,
long end)
Sets the range of the object to download and return current GetObjectRequest instance (this).
|
getBucketName, getKey, setBucketName, setKey, withBucketName, withKey
addHeader, addParameter, getHeaders, getParameters, getProgressListener, setHeaders, setParameters, setProgressListener, withProgressListener
public GetObjectRequest(String bucketName, String key)
bucketName
- Bucket name.key
- Object Key.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.
public GetObjectRequest withRange(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.
public List<String> getMatchingETagConstraints()
public void setMatchingETagConstraints(List<String> eTagList)
eTagList
- The expected ETag list. OSS only supports one ETag.public void clearMatchingETagConstraints()
public List<String> getNonmatchingETagConstraints()
public void setNonmatchingETagConstraints(List<String> eTagList)
eTagList
- The list of expected ETags (only the first one matters though).public void clearNonmatchingETagConstraints()
public Date getUnmodifiedSinceConstraint()
public void setUnmodifiedSinceConstraint(Date date)
date
- The timestamp.public Date getModifiedSinceConstraint()
public void setModifiedSinceConstraint(Date date)
date
- “If-Modified-Since” parameter.public ResponseHeaderOverrides getResponseHeaders()
public void setResponseHeaders(ResponseHeaderOverrides responseHeaders)
responseHeaders
- The response headers to override.public URL getAbsoluteUri()
public void setAbsoluteUri(URL absoluteUri)
public boolean isUseUrlSignature()
public void setUseUrlSignature(boolean useUrlSignature)
public String getProcess()
public void setProcess(String process)
Copyright © 2017. All Rights Reserved.