public class DeleteObjectsRequest extends GenericRequest
bucketName, httpMethod, userHeaders| Constructor and Description |
|---|
DeleteObjectsRequest() |
DeleteObjectsRequest(String bucketName)
构造函数
|
DeleteObjectsRequest(String bucketName,
boolean quiet,
KeyAndVersion[] keyAndVersions)
构造函数
|
DeleteObjectsRequest(String bucketName,
boolean quiet,
KeyAndVersion[] keyAndVersions,
String encodingType)
构造函数
|
| Modifier and Type | Method and Description |
|---|---|
KeyAndVersion |
addKeyAndVersion(String objectKey)
新增待删除的对象
|
KeyAndVersion |
addKeyAndVersion(String objectKey,
String versionId)
新增待删除的对象
|
String |
getEncodingType()
获取 key 编码类型
|
KeyAndVersion[] |
getKeyAndVersions()
获取待删除对象数组
|
List<KeyAndVersion> |
getKeyAndVersionsList()
获取待删除对象列表
|
boolean |
isQuiet()
获取批量删除对象的响应模式,false时使用verbose模式, true时使用quiet模式
|
void |
setEncodingType(String encodingType)
对 key 进行 url 编码,处理 xml 1.0 不支持的字符
|
void |
setKeyAndVersions(KeyAndVersion[] keyAndVersions)
设置待删除对象数组
|
void |
setQuiet(boolean quiet)
设置批量删除对象的响应模式,false时使用verbose模式, true时使用quiet模式
|
String |
toString() |
addUserHeaders, getBucketName, getHttpMethod, getUserHeaders, isRequesterPays, setBucketName, setRequesterPays, setUserHeaderspublic DeleteObjectsRequest()
public DeleteObjectsRequest(String bucketName)
bucketName - 桶名public DeleteObjectsRequest(String bucketName, boolean quiet, KeyAndVersion[] keyAndVersions)
bucketName - 桶名quiet - 删除响应方式,false时使用verbose模式,true时使用quiet模式keyAndVersions - 待删除对象数组public DeleteObjectsRequest(String bucketName, boolean quiet, KeyAndVersion[] keyAndVersions, String encodingType)
bucketName - 桶名quiet - 用于指定使用quiet模式,只返回删除失败的对象结果keyAndVersions - 待删除的对象 key 与版本号encodingType - 对响应中的 Key 进行指定类型的编码。如果 Key 包含 xml 1.0标准不支持的控制字符,
可通过设置 encoding-type 对响应中的Key进行编码,可选值 "url"public boolean isQuiet()
public void setQuiet(boolean quiet)
quiet - 批量删除对象的响应模式public void setEncodingType(String encodingType)
encodingType - 元素指定 key 的编码类型,可选 urlpublic String getEncodingType()
public List<KeyAndVersion> getKeyAndVersionsList()
public KeyAndVersion addKeyAndVersion(String objectKey, String versionId)
objectKey - 对象名versionId - 对象版本号public KeyAndVersion addKeyAndVersion(String objectKey)
objectKey - 对象名public KeyAndVersion[] getKeyAndVersions()
public void setKeyAndVersions(KeyAndVersion[] keyAndVersions)
keyAndVersions - 待删除对象数组public String toString()
toString in class GenericRequestCopyright © 2021. All rights reserved.