最近更新时间:2021-11-01 20:45:56
删除一个指定的对象(Object)。该 API 的请求者需要对存储桶有写入权限。以下为示例代码:
DeleteObjectRequest request = new DeleteObjectRequest("<bucketName>", "<objectKey>");
client.deleteObject(request, new DeleteObjectRequestHandler() {
@Override
public void onSuccess(int statesCode, Header[] responceHeaders) {
// 删除成功 statesCode:204
}
@Override
public void onFailure(int statesCode, Ks3Error error, Header[] responceHeaders, String response, Throwable paramThrowable) {
//请求异常
}
});
纯净模式