public class GeneratePresignedUrlRequest extends Object
构造器和说明 |
---|
GeneratePresignedUrlRequest(String bucketName,
String key)
Constructor with GET as the httpMethod
|
GeneratePresignedUrlRequest(String bucketName,
String key,
HttpMethod method)
Constructor.
|
限定符和类型 | 方法和说明 |
---|---|
void |
addAdditionalHeaderName(String name) |
void |
addHeader(String key,
String value) |
void |
addQueryParameter(String key,
String value) |
void |
addUserMetadata(String key,
String value)
Add a user's customized metadata.
|
Set<String> |
getAdditionalHeaderNames()
Gets additional HTTP header names.
|
String |
getBucketName()
Gets
Bucket name |
String |
getContentMD5()
Gets the file's MD5 value.
|
String |
getContentType()
Gets the content type header.
|
Date |
getExpiration()
Gets the expiration time of the Url
|
Map<String,String> |
getHeaders()
Gets HTTP Headers
|
String |
getKey()
Gets the
OSSObject key. |
HttpMethod |
getMethod()
Gets Http method.
|
String |
getProcess()
Gets the process header.
|
Map<String,String> |
getQueryParameter()
Gets the query parameters.
|
ResponseHeaderOverrides |
getResponseHeaders()
Gets the response headers to override.
|
int |
getTrafficLimit()
Gets traffic limit speed , its unit is bit/s
|
Map<String,String> |
getUserMetadata()
Gets user's customized metadata.
|
void |
setAdditionalHeaderNames(Set<String> additionalHeaderNames)
Sets additional HTTP header names
|
void |
setBucketName(String bucketName)
Sets the
Bucket name. |
void |
setContentMD5(String contentMD5)
Sets the file's MD5 value.
|
void |
setContentType(String contentType)
Sets the content-type header which indicates the file's type.
|
void |
setExpiration(Date expiration)
Sets the expiration time of the Url
|
void |
setHeaders(Map<String,String> headers)
Sets Http headers.
|
void |
setKey(String key)
Sets
OSSObject key. |
void |
setMethod(HttpMethod method)
Sets Http method.
|
void |
setProcess(String process)
Sets the process header.
|
void |
setQueryParameter(Map<String,String> queryParam)
Sets the query parameters.
|
void |
setResponseHeaders(ResponseHeaderOverrides responseHeaders)
Sets the response headers to override.
|
void |
setTrafficLimit(int trafficLimit)
Sets traffic limit speed , its unit is bit/s
|
void |
setUserMetadata(Map<String,String> userMetadata)
Gets user's customized metadata.
|
public GeneratePresignedUrlRequest(String bucketName, String key)
bucketName
- Bucket name.key
- Object key.public GeneratePresignedUrlRequest(String bucketName, String key, HttpMethod method)
bucketName
- Bucket name.key
- Object key.method
- HttpMethod.GET
。public HttpMethod getMethod()
public void setMethod(HttpMethod method)
method
- HTTP method.public void setBucketName(String bucketName)
Bucket
name.bucketName
- Bucket
name.public Date getExpiration()
public void setExpiration(Date expiration)
expiration
- The expiration time of the Url.public void setContentType(String contentType)
contentType
- The file's content type.public String getContentType()
public void setContentMD5(String contentMD5)
contentMD5
- The target file's MD5 value.public String getContentMD5()
public void setResponseHeaders(ResponseHeaderOverrides responseHeaders)
responseHeaders
- The response headers to override.public ResponseHeaderOverrides getResponseHeaders()
public Map<String,String> getUserMetadata()
Gets user's customized metadata.
OSS uses x-oss-meta- as the prefix in the http headers to transfer the user's customized metadata. However the key value returned by getUserMetadata does not have the prefix---the prefix is added by SDK automatically. The key is case insensitive and will always be in low case when it's returned from OSS. For example, if the key is MyUserMeta,the key returned by this method will be myusermeta.
Map
instance that contains the user's customized
metadata.public void setUserMetadata(Map<String,String> userMetadata)
userMetadata
- User's metadatapublic void addUserMetadata(String key, String value)
key
- The metadata key. Note: this key should not have prefix of
'x-oss-meta-'.value
- the metadata's value.public Map<String,String> getQueryParameter()
public void setQueryParameter(Map<String,String> queryParam)
queryParam
- Query parameters.public String getProcess()
public void setProcess(String process)
process
- The process header.public void setHeaders(Map<String,String> headers)
headers
- HTTP Headers。public Set<String> getAdditionalHeaderNames()
public void setAdditionalHeaderNames(Set<String> additionalHeaderNames)
additionalHeaderNames
- additional http header names.public void addAdditionalHeaderName(String name)
public void setTrafficLimit(int trafficLimit)
public int getTrafficLimit()
Copyright © 2019. All Rights Reserved.